Import File DTS

  • I have a DTS package that imports the data from csv file into the table everyday. I Now the import filename is different (with datetimestamp) every day.

    Two questions:

    1. I am trying to use global variable to create a file name dynamically but somehow not able to use it into the import process.

    2. I have added one extra column into the destination table, I want to have a import filename into it so that I can track which row is from which file.

    How to do this?

    Thank you,

  • If you meant SSIS package, and not actually DTS (SQL 2000, 7.0):

    kausmail (6/8/2012)


    I have a DTS package that imports the data from csv file into the table everyday. I Now the import filename is different (with datetimestamp) every day.

    Two questions:

    1. I am trying to use global variable to create a file name dynamically but somehow not able to use it into the import process.

    In the properties of the Flat File connection (highlight connection in Connection Manager pane and press F4) you'll want to go into Expressions, and set the ConnectionString property to your variable.

    2. I have added one extra column into the destination table, I want to have a import filename into it so that I can track which row is from which file.

    How to do this?

    For this you can use the Derived Column Transformation in your Data Flow, in between your Flat File Source and your OLE DB Destination, to add a column. Again, you'll use the variable containing your derived file name as the value of the new column.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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