Processing changes to same record
Hi,
What is the best way to process updates to the same record? I.e. I receive a flat file containing multiple rows, but sometimes two rows are about the same record and I should process both updates sequentially. The first row might contain a StartDate and
EndDate and the second row contains a new StartDate of the same product.
The result should be that the existing row in the database is updated with the supplied EndDate and a new record is created for the second row supplied. I was thinking to handle it in two stages, the first one should update the existing row, the second stage
looks up the updated row in the database and will create a new row.
Is this this right approach?
Regards,
Ren
August 10th, 2012 9:48am
Hello Ren,
It seems to me too that using two Data Flow Tasks to go through the same data file is the best approach.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 10:00am
Given the above scenario your approach sounds reasonable. However my only advice would be to stage the data in a temporary transactional table instead of parsing the flat file 2 times. Having this staging table will help in writing efficient queries in achieving
the said scenario.http://btsbee.wordpress.com/
August 10th, 2012 10:06am
Given the above scenario your approach sounds reasonable. However my only advice would be to stage the data in a temporary transactional table instead of parsing the flat file 2 times. Having this staging table will help in writing efficient queries in achieving
the said scenario.http://btsbee.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 10:10am