2
votes

I have a task wherein I have to get only today's data in excel file, like if i run the package tomorrow it will only shows tomorrow's data.

What I am doing is,

  1. on control flow task, I am having 2 execute SQL task and 1 Data flow task
  2. On first execute sql task I am selecting the connection type as Excel and statement as

    DROP TABLE `Excel Destination`
    
  3. On second execute sql task I am selecting the connection type as Excel and statement as

    CREATE TABLE `Excel Destination` (
    `Id` Long
    )
    
  4. on data flow task I am taking source as OLE DB and destination as Excel.

But everytime I run the package it is still appending the excel and not over-riding. Can anyone help me and let me know what is the problem in the above package

enter image description here

1

1 Answers

0
votes

I think you are on the right way, you can follow this article for a detailed answer

Just do the following editing

  • in the create statment try using DOUBLE instead of LONG
  • in the excel destination don't select the sheet name from the combobox but choose to add new table with the create sql command you provided. (take a look at the link above)