oracle - What could cause an ORA-00936 - Missing Expression with the following sql? -


we're seeing error message ora-00936 missing expression following sql:

note cut-down version of bigger sql rewriting inner join or similar not in scope of this:

this sql fails:

select (select count(*) gt_roster ros_rosterplan_id = rpl_id) gt_rosterplan rpl_id = 432065061 

what i've tried: * extracting innermost sql , substituting id outer sql gives me number 12. * aliasing both sub-query, , count(*) individually , both @ same time not change outcome (ie. still error)

what else need at?

the above tables, no views, rpl_id primary key of gt_rosterplan, , ros_rosterplan_id foreign key column, there no magic or hidden information here.


edit: in response answer, no, not need aliases here columns uniquely named across tables.


solved: problem client running wrong client driver version, 9.2.0.1, , there known problems version.

that should work, assuming column names not ambiguous (and if lead different error). ran equivalent statement , got result without error:

sql> select (select count(*) emp2 empdeptno = deptno)   2  dept   3  deptno=10   4  /  (selectcount(*)fromemp2whereempdeptno=deptno) ---------------------------------------------                                             3 

googling appears there or have been oracle bugs leading ora-00936 errors - see this example.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -