Re: create trigger statement
one trigger with 3 statements (insert, delete , update) inside the trigger
important to know: this statements are performed on a SHADOWTABLE.
the delete trigger should check for each device from table DEVICE if it has a record in the SHADOWTABLE on deleting from table A
4 possibilities when checking SHADOWTABLE :
no entry
entry with action 'U','I' ,'D' specified
pseudo code
AFTER DELETE on A
//it should check for each device wich statement to perform!!!::
foreach DEVICE ID from DEVICE {
INSERT INTO SHADOWTABLE ///this means that there was no entry for old.A
VALUES (old.A, DEVICE ID, ‘D’)
WHERE action != ‘I’ or ’U’ ; //
ELSE
DELETE FROM SHADOWTABLE
WHERE action= ‘I’ ;
ELSE
UPDATE SHADOWTABLE
SET action=‘D’ where action=’U’
}
clear?? otherwise ask me ;) now I'm busy with examinations;)
Subject
Views
Written By
Posted
4690
June 03, 2006 08:37AM
2272
June 09, 2006 05:29PM
2278
June 09, 2006 09:27PM
Re: create trigger statement
2202
June 11, 2006 12:27PM
2412
June 11, 2006 10:06PM
2146
June 13, 2006 12:04AM
2298
June 13, 2006 12:05AM
2242
June 13, 2006 06:53AM
2151
June 13, 2006 08:24AM
2282
June 13, 2006 09:16AM
2407
June 13, 2006 03:42PM
2281
June 13, 2006 07:45PM
2665
June 14, 2006 12:25AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.