DTS Export with Parameter

  • I am trying to run a DTS Export using a stored procedure that expects a parameter.

    I tried this in the Tranform Data Task Properties:

    EXEC usp_outOfState ?

    However, I get an error:

    No value given for one or more required parameters.

    Thank you for the help!

  • Put the EXEC in an Execute SQL task.

    Greg

  • I now have 3 things in my DTS package:

    1. Microsoft OLE DB Connection

    2. Execute SQL Task

    3. Text File Destination

    How do I connect them? Thank you.

    Greg Charles (3/5/2009)


    Put the EXEC in an Execute SQL task.

  • I apologize for misreading your original question. You were on the right track when you had the EXEC stored procedcure in a Transform Data task, but you need to link the stored procedure parameter to a global variable and pass a value to the global variable when the package is executed.

    If you're manually executing the package in Enterprise Manager, you can set the global variable value in the package properties. If you're using DTSRUN to execute it, you can assign a value to the global variable by using the /A argument.

    Greg

  • Greg - thank you for the reply.

    I am not sure if I am doing this correctly.

    I go into the Transform Data Task Properties.

    Source Tab

    Click on Parameters

    Create new Input Global Variables

    Name - firstInit

    Type String

    Value - if I put in a letter it works, if I put in a ? then all values are exported. Is there a way to input this value during run time?

    Basically run the DTS export and have DTS ask for the variable?

    Thank you.

    Norbert

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

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