November 13, 2009 at 8:47 am
SSIS how to delete or empty out destination xls files for futre runs
first time I create the Excel desination i choose create new, but after the first run , i will create new again.
I want to set up a step before it runs to moveRename old Xls files, then it runs extracts data from sps in sql server and dumps then into newly created xls file. how to do this.
thanks in advance
November 16, 2009 at 11:44 am
Ok here was my solution that works well.
1. use the file system task in the Control flow tab right click the file system task and choose edit. It allowed me to
simply choose among other very useful selections, to "Delete Contents from a directory" and selected my DirectoryPath variable I created earlier at the package scope level
2. Then used an On Success precedence constraint and I dragged and Execute SQL task > chose edit and select Excel as the Connection Type, Left my exsiting connection I had made for this excel file under connection manager for my Connection, and for SQL Statement I stole the Create Table script your Excel Destination flow in your Data Flow Tab and pasted it in the SQL statement area in the edit window of the Execute SQL task. Works great!
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply