OLE DB command tranformation in data flow.

  • Hi,

    Can any one tell me the exact use of OLE DB command transformation with example?

    Is it always necessary to use stored procedure to be passed as value of 'Sql command' property of this editor? I tried giving T-SQL statement as the value but it has not given any output.

    Pls help me in this matter.

    Thanks in advance.

  • I use the OLEDB command transformation for updates

    For example, I will update field1, field2 where the key is equal.

    So the OLEDB command would look something like this

    Update sometable set field1 = ?, field2 = ? where key = ?

    In the parameter mapping section, I would map the source for field1, field2, key to parm0,1,2

    Trust this helps

    ~PD

  • If you are using a stored procedure use it like

    exec ?,?

    map the parameters to the respective fields

    if the stored procedure has an output parameter then add the column to be returned to the dataflow before the oledb command component and map the output parameter to the added column

    exec ?,?,? OUTPUT

    MAP THE THIRD PARAMETER TO THE ADDED COLUMN IN THE DATAFLOW

    Regards
    Venkat
    http://sqlblogging.blogspot.com[/url]

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

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