Parameter for Filename in DTS Package export

  • Hi I was wondering if there is a way to insert a parameter into the export filename for a DTS package.

    My DTS package takes a parameter YEAR which is used in the query from the DB and therefore would like the results to be separated by that parameter as well.

    e.g the export file would be something like C:\MYFILE_[YEAR].txt

  • You could use an ActiveX script to assign the filename to a Global Variable and then either continue the script to set the DataSource or use a Dynamic Properties Task after the script.

    Something like DTSGlobalVariables("gv_FullFilePath").Value = "C:\MYFILE_" & DTSGlobalVariables("gv_Year").Value & ".txt" would set up the file name.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • Thanks Adrian,

     

    I actually did work it out finally, and the appraoch you suggested was exactly the path that I took.

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

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