Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL: ORA-00920: invalid relational operator" Error

Re: PL/SQL: ORA-00920: invalid relational operator" Error

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Thu, 03 Nov 2005 22:58:10 +0100
Message-ID: <dke15b$nfb$00$1@news.t-online.com>


adrian_ang schrieb:
> i don't think there is such an operand in in the if clause , just try
> to use some ORs:
>
> if ACCOUNT_ROW.tax2_id = 999999999 or ACCOUNT_ROW.tax2_id =888888888 or
> ....
>

To adrian_ang:
If you have some doubts of using IN in IF .. THEN construct, you can try to execute the following piece of code:

DECLARE
LOC_VAR VARCHAR2(10);
BEGIN
LOC_VAR:= 'A';
IF LOC_VAR IN ('A','B','C') THEN
DBMS_OUTPUT.PUT_LINE('THERE IS SUCH OPERATOR'); ELSE
DBMS_OUTPUT.PUT_LINE('THERE IS NO SUCH OPERATOR'); END IF;
END;
/

or just lookup in the documentation
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/expression_definition.htm#i34030

To OP:
You may be interesting in some reading on Performing SQL Operations from PL/SQL
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperations.htm Performing SQL Operations with Native Dynamic SQL http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/dynamic.htm

Best regards

Maxim Received on Thu Nov 03 2005 - 15:58:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US