Checking the number of Rows in a result set returned by Execute SQL task

  • I need to check the number of rows in a result set returned by a query in execute SQL task and execute different flows based on the number of rows. Please let me know the steps for doing this.

    Thanks

  • In execute Sql Task options

    Set the followng options

    Result Set: Single Row

    In the parameter mapping tab

    map the result set to a variable

    The variable will be assigned with the number of rows effected

    to get the no of rows effected from the sp or the function

    use the following statement

    Select @@ROWCOUNT

    Regards
    Venkat
    http://sqlblogging.blogspot.com[/url]

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

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