making sure that one update statement update only one row

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kirankota79
Premium Member
Premium Member
Posts: 315
Joined: Tue Oct 31, 2006 3:38 pm

making sure that one update statement update only one row

Post by kirankota79 »

I have a job set up like

Dataset------------->transformer--------->Oracle stage.

I update some columns using key columns in the oracle tables (upsert). Can you please let me know, if there is anyway to make sure that each update statement updates only one row. I know that if the keys are unique it will update only one row. But just to want to make sure....Is there a way we can up in the datastage? which lets us know that a particular update statement updated more that one row?

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Short answer? No. You must ensure that what you've marked as the Key fields for the update uniquely identify a single record.

If your update leaves fingerprints on each record updated, say like a timestamp, then you could check after job that the link count sent to the Oracle stage = the number of update timestamps found in the database after the commit, but easier to ensure uniqueness and then not worry about it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply