Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Please help me to solve error ORA-00904

Author  Topic 

simi28
Starting Member

27 Posts

Posted - 2009-04-24 : 05:21:16
I have a input p_groupmonths if p_groupmonths=1 then some value will display else 0.

below is the code
decode(:p_groupmonths,'1',to_number(to_char(rptfrom,'MM')),0) perSl,

instead of input valriable i want to show both 1 and 0 and if 1 then some value else 0
for the same my query is below:



(select 1 aoi from dual union all select 0 from dual) ,

case
when (aoi='1')
then to_number(to_char(rptfrom,'MM'))
else
'0'
end as aoi,


But I a getting error. ORA-00904: "AOI": invalid identifier
Can anybody help me to solve this?

Thanks and Regards
Simi

matty
Posting Yak Master

161 Posts

Posted - 2009-04-24 : 05:33:25
This is SQL Server Forum. You will get more help if you post your question in an Oracle forum.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-04-24 : 05:55:37
Try www.dbforums.com



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -