Dynamic value to pass to SSIS variable

  • I have a job that I want to run that passes a variable to an ssis package. The variable is a filename but the filename changes daily. I have an access front end that the user enters the filename into. The access program runs a stored procedure which writes the filename to a temp table and then runs the job. I would like the job to query that table for the filename and pass it along to my package variable.

    I can get the job to work using a static filename. On the set values tab I used the property path \Package.Variables[User::FileName] and the value \\myserver\..\..\..\filename.txt. But I don't know how to replace that filename with the results of the query.

    I look forward to hearing your thoughts.

    Thanks,

    Scott

  • scotdg (2/26/2016)


    I have a job that I want to run that passes a variable to an ssis package. The variable is a filename but the filename changes daily. I have an access front end that the user enters the filename into. The access program runs a stored procedure which writes the filename to a temp table and then runs the job. I would like the job to query that table for the filename and pass it along to my package variable.

    I can get the job to work using a static filename. On the set values tab I used the property path \Package.Variables[User::FileName] and the value \\myserver\..\..\..\filename.txt. But I don't know how to replace that filename with the results of the query.

    I look forward to hearing your thoughts.

    Thanks,

    Scott

    Why not change the package so that it runs an ExecuteSQL task to query the table containing the file name & pass the result to a variable? A permanent table would be easier to implement than a temp table.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

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

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