Search code examples
sqlsql-updatedb2ab-initio

Passing Existing Record For Update Again In Update Table Component In Abinitio


What happens if an already existing record is sent for an update query as it is to an update table component? Does it go unused?

I have an abinitio output file which has records to be updated(not inserted). I need to collect only those records which are actually updated. So how can we separate the records which are exactly same as before in DB (not updated) and which have at least one field updated?


Solution

  • My first approach was the same as Alex suggested but it seems like Join with DB with all fields as key will take more time and resources. A better approach is to compare existing values and new values to be updated in a reformat select parameter or Filter by expression for each field. This will give only those records which will actually be updated. Also Michael is right, DB2 will update irrespective of it is an actual update or not. So, unused port will not give the records which are not updated.