Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL: ORA-00920: invalid relational operator" Error
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
![]() |
![]() |