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

SSIS - Delete or Truncate and Excel Destination Table

Status
Not open for further replies.

TickerTimer

Programmer
Jul 2, 2010
7
GB
Hi

I am transferring data from an SQL table to an Excel Spreadsheet / Table.

I need to delete the previous data and refresh it with new data each time the SSIS package is run. However I need the spreadsheet and the table (page) within it to remain constant (i.e. the names need to stay the same).

The approach I keep reading about, suggests adding an Execute SQL task (DELETE TABLE 'Excel_Table_Name') to delete the current table/page and then add another Execute SQL task to create it again.

Whenever, I try this, the DELETE table approach only deletes the table/page headings - it doesn't delete the page/table.

Does any one know where I'm going wrong or an approach that works?

All help appreciated.

Thanks.
 
For clarification I'm using 'DROP TABLE' not 'DELETE TABLE'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top