Saturday, 15 August 2015

sql - ORA-00920: invalid relational operator in where clause -



sql - ORA-00920: invalid relational operator in where clause -

i ora-00920: invalid relational operator error when next contion clause.

and (round(to_number(c.rest_time - a.time_stamp) * 24 * 60 )) > 5

full clause

from tablea a,tableb b round(to_number(a.rest_time - a.time_stamp) * 24 * 60 )) > 5 , a.time_stamp > '05-12-2014 22:00:00' , a.rest_time < '05-14-2014 14:00:00' , a.dev = 'customer' , b.xid = a.xid , b.accno = a.accno , b.name not null , b.dis null

you have right parenthesis . should ... round(to_number(a.rest_time - a.time_stamp) * 24 * 60 ) > 5 ...

for instance,

-- case (throws invalid relational operator ): select 1 dual round(to_number(sysdate- sysdate) * 24 * 60 )) > 5 ; --corrected : select 1 dual round(to_number(sysdate- sysdate) * 24 * 60 ) > 5 ;

sql oracle

No comments:

Post a Comment