Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> If EXISTS before insert clause
In my sql script file for SQL Server I have:
IF EXISTS(SELECT PRD_UID FROM WST_PRD WHERE PRD_UID = 502)
BEGIN
INSERT INTO WST_PFD (PFG_UID, OBJ_UID) VALUES('14014', 'GRP_VIEW_RSK')
.
.
.
END
Basically I want to see if an entry exists, reflecting that a product
in installed, and if so run a group of inserts, etc.
This works fine in SQL Server but Oracle is not liking it. I know IF EXISTS doesn't exist here so how should I best do this to run in a script file?
jim Received on Fri Feb 04 2005 - 15:01:56 CST