Decision fork based on row counts

  • I see how to get two different row counts.. once I have those values in variables does anyone have a suggestion on how to implement a comparison and then decision structure? Do I need to use a script task for this? Basically I'm comparing the row counts of two tables and if they are different, go run the import again with a different set of parameters.

    Any thoughts welcome.

    Thanks,

    Donalith

  • You should be able to use the Precedence Constraint with the addition of an evaluated expression - basically like using a 'green' arrow (ie continue on if the prior stage executed with success) with the addition of a check that @a == @B. You may need to have the variables at the/a level outside of the data flow (ie so they can be seen in the control flow).

    http://msdn.microsoft.com/en-us/library/ms141261.aspx

    Steve.

  • Thanks, Steve, I'll take a look.

    The variables are at the package level so that shouldn't be an issue.

    Donalith

  • Steve is right on target with his recommendation. Contingent logic is usually best directed via an expression Constraint. Just doubleclick on the green arrow to pull up the interface. You'll most likely want Expression and Constraint as your choice, and use the logical AND for the result.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Thank you, everyone, that was the solution I was looking for.

    Donalith

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

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