IF statement

  • How do you use an IF statement in SSIS?

    I have a table that has a column [status] with values 1,2

    1 = downloaded to stage table

    2 = downloaded to final table

    I want to evaluate the conditions in the column [status]

    if [status] = 1

    begin

    Data Work Flow Task to insert from Oracle to Stage.

    end

    if [status] = 2

    begin

    Data Work Flow Task to insert from Stage to Final.

    end

    How could I do this or any way to do this? What is the best practice? I don't want to use transaction as it locks up the tables.

  • pleasehelpme (12/31/2008)


    How do you use an IF statement in SSIS?

    I have a table that has a column [status] with values 1,2

    1 = downloaded to stage table

    2 = downloaded to final table

    I want to evaluate the conditions in the column [status]

    if [status] = 1

    begin

    Data Work Flow Task to insert from Oracle to Stage.

    end

    if [status] = 2

    begin

    Data Work Flow Task to insert from Stage to Final.

    end

    How could I do this or any way to do this? What is the best practice? I don't want to use transaction as it locks up the tables.

    You have to load the column value in package variable. And then evaluate the variable in expression. Check this post for more information.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

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

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