MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Procedural constructs in DB2 trigger body

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
dilip
Beginner


Joined: 08 Nov 2003
Posts: 7
Topics: 7
Location: india

PostPosted: Sat Nov 08, 2003 5:28 am    Post subject: Procedural constructs in DB2 trigger body Reply with quote

Hi,

Currently WLM environment is not loaded.

Is it possible to use procedural constructs (such as DECLARE, IF, WHILE ...) in the body of Trigger in DB2.

Dilip
_________________
Dilip T.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Nov 08, 2003 9:05 am    Post subject: Reply with quote

Dilip,

Not really. However you can have trigger execute(call) a stored procedure which have the procedural constructs.
Code:

CREATE TRIGGER TRIGNAME AFTER INSERT ON TABLE
REFERENCING NEW AS NEW FOR EACH ROW MODE DB2SQL
CALL <SPNAME>(...);


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group