PDA

View Full Version : IF NOT EXISTS in Oracle?


Psiclonik
02-25-02, 16:09
is oracle capable of doing this?

IF NOT EXISTS( SELECT item_id from PROJECT_WMS_TEMP where item_id = ITEM_ID) THEN
BUILD_PROJECT_WMS_TEMP;
End If;
Thanks
Christian

alligatorsql.com
02-25-02, 19:56
Hello,

you can use PL/SQL Funktion in a SQL statement

something like ...

BEGIN
SELECT ...
EXCEPTION
WHEN NO_DATA_FOUND THEN
call proc;
END;

Hope this help ?

Greetings
Manfred Peter
(Alligator Company)
http://www.alligatorsql.com

*** did you ever use Oracle, MySQL, Interbase and Birdstep with one tool ? No ? Try AlligatorSQL ... ***