execute a package based on a condition

  • How can we execute a package based on a condition.Where do we need to put the condition.

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • We need more info. It depends on how you are calling the package. Are you executing it from a proc? From .NET code? etc. One option is also to have the package check the condition up front.

  • well the condition is like this if @ recordcount >100

    execute Pacake1

    else execute Package 2

    Is there any way i can use if else T-sql in ssis to runa package.

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • So you want to create a wrapper package that checks a condition (the value of recordcount) and then calls the appropriate package?

    If you have the recordcount in a variable, then you can simply use an empty sequence container with 2 branches with a positive (recordcount > 100) and negative (recordcount is <= 100) contraint that each hook to an execute package task.

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

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