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 

query in DB2 trigger

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


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Wed Nov 12, 2008 8:25 am    Post subject: query in DB2 trigger Reply with quote

Members,


I have table with columns:
Code:

EMPNO EMPNAME EMPAGE



I want to create a trigger in update mode that whenever the employee no is 111 , i want to update the EMPNO as 1 EMPNAME as X and EMPAGE as 10 and when EMPNO is not 111 i want to have EMPNO as 2 EMPNAME as Y and EMPAGE as 20 , please let me know how to do this and how do i execute my trigger.Thanks.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 12, 2008 9:18 am    Post subject: Reply with quote

this is a link to a REDBOOK which discusses triggers:
though it is for db2 vsn9, the discussion is tailored for learning.
you can then go to the appropriate Appl Programers guide
for the version of db2 on your machine and determine what specfic
functions/syntax you need to follow:

http://www.redbooks.ibm.com/abstracts/sg246503.html?Open
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
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