Search code examples
sqlstored-proceduressql-server-2008-r2ssis-2008

SSIS Execute SQL Task calls a stored procedure. How to get count of records returned by SP


My SSIS has Execute SQL Tasks which just calls a stored procedure. How to get count of records returned by the stored procedure?


Solution

  • In your stored procedure, you can include a SELECT statement to return the row count.

    CREATE proc test_proc as
    begin
        ....
        select rowcnt= 230
    end
    

    And as per the Execute SQL Task setup, I captured and attached 2 images here below.

    enter image description here enter image description here