Quantcast
Viewing all articles
Browse latest Browse all 13329

db2 Update Trigger help?

I'm using DB2 9.7 with AIX 6.1. I'm new to Triggers.
I'm working on an Update trigger that if the first Table updates rows it would automatically update the second Table with the same updates.

Here is what I have so far (Update SLDCTO field) and it updates the first table (F42199) but not the second table(F42199_PART):

db2 "create trigger DB2INST1.F42199_PART_UT after update on PRODDTA.F42199 REFERENCING old AS O FOR EACH ROW MODE DB2SQL
update PRODDTA.F42199_PART AS N
set N.SLDCTO=O.SLDCTO
WHERE O.SLKCOO=N.SLKCOO and O.SLDOCO=N.SLDOCO and O.SLDCTO=N.SLDCTO and O.SLLNID=N.SLLNID"

I do appreciate your help on this because I am not getting this to work and really need an experieced person to assist me on what is wrong.

Thank you so much.

CC

Viewing all articles
Browse latest Browse all 13329

Trending Articles