cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Database error: ORA-00936: missing expression

Former Member
0 Likes
4,574

Hi Experts,

I have created one Sales Object in IDT by using below condition.


CASE WHEN((tab.source='india' AND tab.acontno LIKE '502%') OR

(tab.source='india' AND tab.acontno LIKE '501%')OR

(tab.source='india' AND tab.acontno= 'UNKNOWN')OR

(tab.source='india' AND tab.acontno = 'OTHERS')OR

(tab.source='india' AND tab.acontno is NULL))

THEN 'Y'

ELSE 'N'

END,

when i drag this sales object at query level its throwing error like Database error: ORA-00936: missing expression. (IES 10901) (WIS 10901).

But when i create filter condition in IDT with same condition its working fine and i can see the data  i created condition like

CASE WHEN((tab.source='india' AND tab.acontno LIKE '502%') OR  

(tab.source='india' AND tab.acontno LIKE '501%')OR

(tab.source='india' AND tab.acontno= 'UNKNOWN')OR

(tab.source='india' AND tab.acontno = 'OTHERS')OR

(tab.source='india' AND tab.acontno is NULL))

but now my requirement is user wants to see one object at report level based on that they will filter the data at report level.

Please help me on this.

Reagards,

DSP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi All,

Sorry for late reply. Actually the problem is in Where condition in IDT. In that where condition one SPACE there. in query level  where condition last it written like ( ) this.that is the reason its getting this error.Now I remove this space in where condition in IDT  then the problem got solved.

Cheers,

DSP

Former Member
0 Likes

Good that you solved the problem

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Durga,

there was unwanted comma at the end, try using the below and see if it works.

CASE WHEN

(

(tab.source='india' AND tab.acontno LIKE '502%')

OR

(tab.source='india' AND tab.acontno LIKE '501%')

OR

(tab.source='india' AND tab.acontno = 'UNKNOWN')

OR

(tab.source='india' AND tab.acontno = 'OTHERS')

OR

(tab.source='india' AND tab.acontno is NULL)

)

THEN 'Y'

ELSE 'N'

END

Thanks

Mallik

former_member188911
Active Contributor
0 Likes

Hi Durgasaiprasad,

have you tried to debug the query in SQL+ or Toad?

Thanks

SC