Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

If/else statement and trigger

785040Sep 3 2010 — edited Nov 11 2010
Hello! ^^

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. ^^;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2010
Added on Sep 3 2010
12 comments
5,935 views