DTS->Transformation Data Task->Destinaton Tab

  • Hello Members,

    I've created a stored procedure to get data from base tables by joining them after some calculations. They are running perfectly from QA. Later created a DTS package and trying to write this data into an excel file. This package was scheduled to run as a job every night which takes hardly < 1 minute. The excel file is being appended with the new data every time. I want to know the syntax for dropping the table under the destination tab in Transformation Data Task properties.

    This is the create statement in the destination tab:

    CREATE TABLE `utbl_salesinfo` (

    `Salesman Name` VarChar (100) ,

    `Area Code` VarChar (20) ,

    `Area Name` VarChar (40),

    `Sales Amount` Int,

    `Sales Target` Int,

    `Target Reached` Char(1),

    `Days Left` SmallInt )

    Thanks in advance. 


    Lucky

  • Create an 'Execute SQL Task' using the excel connection and do

    DROP TABLE `utbl_salesinfo`

    and join it to the source connection with 'ON SUCCESS'

    not actually done this or tested it but I think it will work

    Far away is close at hand in the images of elsewhere.
    Anon.

  • ooops forgot you may need another 'Execute SQL Task' to create the table using the sql you posted, so the order is

    DROP TABLE --> CREATE TABLE --> TRANSFORM

     

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply