all groups > sql server dts > march 2005 >
You're in the

sql server dts

group:

DTS Package and Delete



DTS Package and Delete dm4714
3/25/2005 8:29:46 AM
sql server dts: I have a DTS package the does an FTP --> Text File Data Source -->>>
Multiple Tasks -->>> SQL Server database.

The input source file has one row that has12 fields.

The multiple tasks basically read 3 columns from the source record and
insert a new row in the destination table until all 12 fields have been
read.

I.E., field1, field2, field3, field4, field5, field5, field6, field7,
field8, field9, field10, field11, field12.

The first task will read fields1-3 and output a row to destination.

The second task will read feidls 4-6 and output a row to destination.

The next task and subsequent will read 3 fields and output to destination.

My question is this: one of the fields has a datetime field. I'm outputting
the datetime field to the desttination. The problem is, if I rerun the DTS
tasks, I will have duplicate rows. I want the ability to delete any rows in
the destination that have a date equal to the date that is in the source
file.

Is there an easy way to accomplish this?

I suppose I could add a Lookup on each task and delete any rows that match
field1, field2, and field3 or whatever field is relevent to that tasks. But
I wanted a way to mass delete anything with the same date in one shot before
the tasks run.

Any ideas or comments would be appreciated.

Re: DTS Package and Delete Axel Dahmen
3/27/2005 5:52:18 AM
[quoted text, click to view]

Yes, you might like to use the Data Driven Query task. You can just update
rows with existing DATETIME values and insert rows with non-existing
DATETIME values.

HTH,
Axel Dahmen
www.sportbootcharter.com


-------------------
"dm4714" <spam@spam.net> schrieb im Newsbeitrag
news:OAaikdUMFHA.508@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button