Home » SQL & PL/SQL » SQL & PL/SQL » getting ORA-00900 invalid SQL statement in a Procedure
getting ORA-00900 invalid SQL statement in a Procedure [message #205272] Fri, 24 November 2006 02:29 Go to next message
sreehari
Messages: 101
Registered: May 2006
Senior Member
Hi all

I am getting ORA-00900 invalid SQL statement error when
i executed the below command in a PL/SQL Procedure, can any one help whether the below command is usable in a procedure or not?




 IF (SELECT COUNT(*) FROM INSERT_UPDATE_DATA_TRACKING WHERE OBJECT_NAME IN ('CERTIFICATE_ID', 'USER_ID', 'ADDRESS_ID', 'COMPANY_ID', 'PRODUCT_ID')) > 0 THEN
            CERTIFICATE_REFRESH(V_UPD_DATE);
        END IF;



Thanks
Re: getting ORA-00900 invalid SQL statement in a Procedure [message #205283 is a reply to message #205272] Fri, 24 November 2006 02:59 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Declare a variable.
And use SELECT ... INTO to populate that.
Use the variable in IF condition.

By
Vamsi
Re: getting ORA-00900 invalid SQL statement in a Procedure [message #205291 is a reply to message #205283] Fri, 24 November 2006 03:16 Go to previous message
sreehari
Messages: 101
Registered: May 2006
Senior Member
Thanks vamsi,

It worked.
Previous Topic: THE PL/SQL BLOCK
Next Topic: oracle error
Goto Forum:
  


Current Time: Sun Dec 04 00:36:48 CST 2016

Total time taken to generate the page: 0.07254 seconds