Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00920: invalid relational operator
ORA-00920: invalid relational operator [message #300765] Mon, 18 February 2008 01:02 Go to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
hi,
while i am executing a query i get ORA-00920: invalid relational operator error.

Query:

select e.deptno
from EMP e,EMP_SAMPLE e1
where e.deptno=e1.deptno
and (e.sal,e.ename)=(e.sal,e.ename);


what is the reason?
Re: ORA-00920: invalid relational operator [message #300767 is a reply to message #300765] Mon, 18 February 2008 01:06 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
what is the reason?

Where do you see it is a valid syntax?

Use IN (but take care of its syntax).

Regards
Michel

[Updated on: Mon, 18 February 2008 01:07]

Report message to a moderator

Re: ORA-00920: invalid relational operator [message #300772 is a reply to message #300765] Mon, 18 February 2008 01:16 Go to previous messageGo to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
Hi,
I used IN operator but i got the same error.
Re: ORA-00920: invalid relational operator [message #300773 is a reply to message #300772] Mon, 18 February 2008 01:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You don't use the correct syntax (despite my warning).

Read the doc: IN Condition

Regards
Michel
Re: ORA-00920: invalid relational operator [message #300820 is a reply to message #300773] Mon, 18 February 2008 03:20 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
and after you read the docs, check your aliases.
Previous Topic: gettint error while using case in sql statement
Next Topic: Comparsion between column names of 2 tables
Goto Forum:
  


Current Time: Wed Dec 07 14:22:19 CST 2016

Total time taken to generate the page: 0.10554 seconds