Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS: DETERMINE IF RECORD CHANGED

Status
Not open for further replies.

PrgrmsAll

Programmer
Apr 8, 2003
180
US
I have a DTSPackage that imports data from a flat-file into a SQLServer table. This import happens any time the input file is available. The table has a field named in_status that flags the record as being an add, change or unchanged (a, c or u). The incoming records can be audited against the records in the table by an ID Number.

Is there something I can do within the DTSPackage, or otherwise, that would determine if the record exists already as is (i.e. unchanged) or if the record exists with some changes (i.e. change) or if the record does not exist (i.e an add). I know I can do a field by field comparison to make this determination but I was wondering if there was a more efficient method to compare, maybe, the entire record at a time?

Any advice/direction would be much appreciated.

Thanks in advance.
 
Hi,

First load the data to another staging table.
Compare that staging table with destination table and insert only new record in to destination table.

Yes, You can do this comparison within the DTSPackage.

Thanks
Gopal


Good Luck
Gopala Krishna Kakani

 
Thanks for your reply. I am glad to know this is possible. How do I actually do the compare? Is there an element that I can add to the package that performs this action?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top