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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete data from the table before loading

Status
Not open for further replies.

Ankor

Programmer
Mar 21, 2002
144
US
What transformation task should be used to delete data from the table before loading. I tried OLEDB Command, but it requires input columns. What input should I provide for the delete command? I attempted to put this command between source and destination (looks really weird), but it works in one small package. The big one hangs, which is not surprising, but I don't know how else the delete command can be called. Thank you.
 
Can't you do a sql task and write the sql for delete/truncate?
 
There is no SQL task in Data Flow Transformations, or I guess they all are SQL tasks, but I don't see anything similar to "Execute SQL Task" that we had in SQL 2000 DTS.
 
Why do you want to start with Dataflow first? If there is no reason then start in Control Flow task, add a 'execute sql task' and write your sql then do whatever you want. If there is a reason you want to start with Dataflow task then create the OLEDB source task first and select your source table THEN create the OLEDB command task and write the delete statement in sqlcommand.

HTH
 
I was trying to put all data flow tasks withing one control flow task. I have some more transformations in the same package, and it looks like I have to separate them. I figured how to do it using source and OLEDB command task, but I think I can also use your first solution. Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top