If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > insert trigger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-09, 16:32
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
insert trigger

Guys, I need to create two insert triggers on the same table, I know Informix does not allow it. Is there a way around?

both triggers need to execute two different stored procedures

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 10-14-09, 08:42
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
hi,

Why can't you execute both procedures (one after the other) as part of trigger action?

CREATE TRIGGER <name>
INSERT|DELETE|UPDATE OF <column-name>, <column-name> {choose one}
ON <table>
[REFERENCING NEW AS <name>] {optionally choose this clause for INSERT or UPDATE triggers}
[REFERENCING OLD AS <name>] {optionally choose this clause for DELETE or UPDATE triggers}
{specify at least one trigger action: BEFORE, FOR EACH ROW, AFTER}
BEFORE [WHEN(<sqlcondition>)] (<actionstatement>)
FOR EACH ROW [WHEN(<sqlcondition>)] (<actionstatement>)
AFTER [WHEN(<sqlcondition>)] (<actionstatement>)
;

regards,

Nitin
Reply With Quote
  #3 (permalink)  
Old 10-14-09, 11:34
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
thanks, I thought about executing both but syntax did not work(have not done this in a while)) out of practice) got it to run

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On