IF Statement within a SSIS Package

  • Hello Everyone

    What would be the Best way to create an IF statement within a SSIS Package?

    I am wanting to fire off a SQL Task, if the Day of the Week is a certain number. If not that number, fire off a different SQL Task

    Should I use a Script Task?

    I write my OOP code using C#, if anyone has an example, I would appreciate seeing an example.

    Thanks in advance

    Andrew SQLDBA

  • AndrewSQLDBA (10/12/2010)


    Hello Everyone

    What would be the Best way to create an IF statement within a SSIS Package?

    I am wanting to fire off a SQL Task, if the Day of the Week is a certain number. If not that number, fire off a different SQL Task

    Should I use a Script Task?

    I write my OOP code using C#, if anyone has an example, I would appreciate seeing an example.

    Thanks in advance

    Andrew SQLDBA

    Let's use the day of the week as an example.

    I would start with a script task that would assign the day of the week to a variable. Connect each of the task you might want to run after this to this task using a precedence contraint. Set these precedence constraints to use an expression. Set each of these expression to TRUE for the day of the week value you want to associate with the task.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

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

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