Friday, March 30, 2012

IF NOT EXISTS in Oracle?

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
ChristianHello,

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 ... ***sql

No comments:

Post a Comment