Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Deleting with Instead Trigger in Oracle 8i

Deleting with Instead Trigger in Oracle 8i

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Wed, 16 Apr 2003 09:35:55 +0100
Message-ID: <E2F6A70FE45242488C865C3BC1245DA7038F883A@lnewton.leeds.lfs.co.uk>


Morning,

you MUST use :OLD in a delete trigger and not :NEW. If you use :NEW then you get the message that n rows have been deleted, but they have not. Change the trigger to the following :

ELSIF DELETING THEN

	DELETE FROM contractorsMV
	WHERE conIDMV = :OLD.conID; 
	
	DELETE FROM contractors
	WHERE conID = :OLD.conID; 


Cheers,
Norm.



Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar_at_LFS.co.uk
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com

-------------------------------------
Received on Wed Apr 16 2003 - 03:35:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US