using variable in Execute Process Task

  • Hello Friends,

    I am trying to implement BCP functionality using Execute Process Task.

    This is the scenario.

    I am reading the name of the table which has to be exported to a text file from a table and storing it in a variable.

    I have configured the Execute process task as follows.

    Executable: BCP.exe

    Arguments: @Source_Table out D:\Department.txt -c -T [@Source_Table variable has the name of the table which has to be exported]

    Success value: 1

    I am not really sure if i would have to select StandardInpurVariable or StandardOutputVariable.

    Please help me on this.

  • In order to pass in variables to the Execute Package as arguments for the bcp command, you are going to have an expression in which you build the entire command line. In the Expressions tab for this task, create a new Expression for Arguments:

    @Source_Table + " out D:\Department.txt -c -T"

    The StandardInpurVariable or StandardOutputVariable you don't specify. They are used to send input in and get output from the bcp program.

    Check out the following:

    http://msdn.microsoft.com/en-us/library/ms141166.aspx

    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/5d98af90-a6c0-42ea-b4a7-da4317c9148b/

    Russel Loski, MCSE Business Intelligence, Data Platform

  • Hello Russell..

    Thanks for the response. I tried using expressions to generate the arguments.. However, the value from the variable is not getting evaluated in the expression..

    Only the string entered manually is getting evaluated.. Any idea of what could be the reason for that ?

  • Hello Russell,

    I tried with expressions for Argument property and the execute process task is working fine...

    Thanks for your help and i really appreciate that.

    Regards,

    Murali

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

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