Something Really Simple

  • Hello Everyone

    Hope that everyone is having a wonderful programming day.

    I am creating a 2008 SSIS package, and would like to try something. I am populating a variable with a count(*) from a table. If this count is 0, then I want to execute a sql task to write to a history table, but if the count is greater than 0, then I want to process other SQL code, using another SQL task.

    My question is, what is the best way to perform this comparison, and execute other steps in the package, or simply execute a SQL task to write to a history table?

    Thank you in advance

    Andrew SQLDBA

  • Actually I think this is pretty simple..

    Following the EXEC SQL task you have two success paths, one goes to the additional processing, the other goes to whatever process you will use to write the history.

    Ok, here is a quick sample:

    and here are the constraints:

    And you only have to touch one of the bottom two constraints to make them OR:

    Answer your question or raise more?

    CEWII

  • Thank you Elliot

    That works perfectly

    Andrew SQLDBA

  • Great, thanks..

    CEWII

  • Oops

    So sorry about misspelling your name Elliott

    Thank You again

    Andrew SQLDBA

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

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