Load File Dynamically

  • How can I dynamically select a file to load in my DTS package?

    How to work with global variable so that I can pass a file name to the pkg through a parameter from a SP.

  • JP,

    have a look at http://www.sqldts.com/

    You will find several examples of how to use gloabl variables to set a filename at runtime.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • could you pls tell me how to use global variable to select a file dynamically for my load.

    I searched the link but still not sure how to proceed.

  • Are you wanting to call this SP from within the package, saving the result or output as a global var?

    If the SP uses an output variable to return the value, then in the Execute SQL task:

      declare @file varchar(100)
      exec get_file @file output
      select @file as [file]

    Click "Parameters" and choose the "Output Parameters" tab. Select "Row Value" and assign the output to a global var.

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

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