Skip to Content
Former Member
Nov 18, 2010 at 03:36 AM

How to dynamically and selectively update DSO based on values in a csv file



I'm loading a csv file into a DSO. When loading the flat file in FULL mode I need to do a pseudo delete of records that were previously loaded but are not in the new flat file.

Is it possible to dynamically determine the unique set of records (say Pk1, Pk2, Pk3) in the csv file and then set all the corresponding DSO records' quantities to 0 - maybe in a start routine?? After that, I can load the csv file with the correct quantities (effectively update and inserts). The net result should be that the change log only be updated through to the next DSO.

Example: Load 10 records yesterday. Today reload 9 records. 10th records must have quantity set to 0. Other 9 records will have quantity values set to those in today's csv file - some will be the same & some will be different. The net change log of all 10 records must be loaded into the next DSO.

Any suggestions on how to do this logic?