SSIS Loop Expression not doing anything .. why?

  • In SQL 2012 I have an SSIS package with a For Loop Container. In the SSIS Package I have a variable @LoopCount as an Int16. Within the Container I check some logic and if true run the following in a C# Script Task:

    int LoopCount = (int)Dts.Variables["User::LoopCount"].Value;

    Dts.Variables["User::LoopCount"].Value = LoopCount + 1;

    And for the Loop container I have this:

    InitExpression: @[User::LoopCount] = 0

    EvalExpression: @[User::LoopCount] > 0

    But when I run the package the loop never loops, just a green check with nothing within it executing. Even if my internal logic is screwy I'd think this would at least do an infinite loop, but it doesn't run even once.

    Thanks for any advice.

  • Shouldn't that be a >= 0 in the EvalExpression?

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

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