July 8, 2010 at 10:24 am
I have an ETL that updates a destination table from a source table.
The ETL determines if the row is new or changed via a lookup and conditional split.
What is the best way to delete rows from my destination table, that do not exist in the source table?
Would an Execute Sql Task be the best way to do this?
Thanks
July 8, 2010 at 10:28 am
Where is your source data coming from? A DELETE query (or series of queries, if lots of rows are to be deleted) would be faster.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
July 8, 2010 at 10:34 am
My source is a Sql Server table. The only way I can think of deleting rows from my destination sql server table is to have an 'Execute Sql Task' and execute a delete comman for rows that don't exist in my source table.
Is this the best way to do this?
July 8, 2010 at 10:50 am
Yes. If there are hundreds of thousands of records to be deleted, I would recommend that you do the delete in batches to avoid huge transactions grinding your system to a halt - but that's still just an Execute SQL task.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
July 9, 2010 at 7:01 am
Thank you so much.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply