Post
by jrheisler » Fri 02 Dec 2016 14:33
After upgrading from 6.3.x to 6.4.x the sql give the error ora-00907: missing right parenthesis
select distinct a.* ,x.obj_id
from chg_master a,object_ids x
where a.chg_num = ''
order by a.ECP_NUM ASC,a.CHG_CAGE ASC ,a.TYPE ASC ,a.REV DESC,a.CORR ASC,a.CHG_TYPE ASC
by changing the sql to this (commenting out the order by), the error goes away:
select distinct a.* ,x.obj_id
from chg_master a,object_ids x
where a.chg_num = ''
--order by a.ECP_NUM ASC,a.CHG_CAGE ASC ,a.TYPE ASC ,a.REV DESC,a.CORR ASC,a.CHG_TYPE ASC
That is the most isolated way I could show it. Unfortunately, there are other parts of our code where many queries are run to and I would likely spend a week going through it all.
Perhaps it has nothing to do with case construction, I don't know, but I do know that a paid upgrade from 6.3.x to 6.4.x resulted in this.