Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Create Triggers

Status
Not open for further replies.

ks01

MIS
Aug 11, 2002
110
US
Hello ...

I hope I am posting this question to the correct forum. My organization uses DB2 V7 and BMC Catalog Manager V6.

I would like to create a trigger so when a user runs an insert query on table A, the [tt]ADD_USER_ID[/tt] and [tt]ADD_TIMSTAMP[/tt] fields are updated with the user/current timestamp information. I would also like to create triggers for update and delete queries to update the [tt]LAST_CHG_USER_ID[/tt] and [tt]LAST_CHG_TIMESTAMP[/tt] fields of the same record.

Does anyone know how I can create this or where I can read more about it? I’ve tried reading up on IBM’s DB2 UDB for OS/390 Administration Guide, but I get lost as I’m a novice.

Thanks in advance ...

Kent
 
There is a redbook on Stored Procedures and Triggers (more than 400 pages ) that you can download as PDF file:
which probably covers some of the things you want to know

T. Blom
Information analyst
tbl@shimano-eu.com
 
Thank you, I will check it out!

Kent :)
 
I didn't think to ask, but when I downloaded the PDF, it refers to DB2 UDB for iSeries. We have DB2 V7 which runs on MVS/TSO. Do you know if it's the same?

Thanks ...

Kent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top