Page 1 of 1

making sure that one update statement update only one row

Posted: Tue Oct 28, 2008 2:20 pm
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

Posted: Tue Oct 28, 2008 2:40 pm
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.