If/else statement and trigger
785040Sep 3 2010 — edited Nov 11 2010Hello! ^^
Using 11g Enterprise Edition.
I want to make a trigger statement to insert a value(determined by the if statement) into a column('Status') on the table 'Training' when a row is updated. This is the SQL I have thought up to put into the trigger on update for each row, but I am taking a wild guess and assuming I am wrong.
IF supplies, station, procedures > 1 THEN
INSERT INTO training
+(status)+
VALUE
+('Complete')+
ELSE
INSERT INTO training
+(status)+
VALUE
+('Incomplete')+
END IF;
Is this wrong? If it is, can someone please point me in the right direction? Thanks in advance for any help. ^^;