thendrickson
Programmer
This may have been answered before, but I am trying to develop a DTS package where I import data from a tab delimited text file into SQL Server 2000.
If the record does not exist I need to append a new record to the table. If it does exist, I need to sum the new "Quantity" field with the existing and update the record.
My only idea so far is to import the data into a temp table using DTS. Then write a stored procedure to loop through that table and if found update the record and if not found then insert a new record.
Is there a better way and if so could someone point me that direction?
If the record does not exist I need to append a new record to the table. If it does exist, I need to sum the new "Quantity" field with the existing and update the record.
My only idea so far is to import the data into a temp table using DTS. Then write a stored procedure to loop through that table and if found update the record and if not found then insert a new record.
Is there a better way and if so could someone point me that direction?