How to get row count back from an SSIS Execute SQL Update Task?

  • Still learning how to utilize some of the SSIS tools and need some assistance with configuring an Execute SQL Task to report back the number of Rows that were Updated.

    I'm running an Execute SQL Task that's performing an Inner-join Update of 7 cols from one table (a staging table source) to a Target table source via the PK that's the same on both. My Connection Manager is MS OLEDB Provider for SQL Server. The Scripted Update command works fine but, I'm also trying to have the number of rows that were updated display in either the packages Output or perhaps a message - confirm box. I've tried to get back the update row count several ways-- with no success. So far I've:

    - Do a SELECT @@RowCount AS 'RowCount2' at the end of the Update Query.

    - Configured: Parameter Mapping with Variable Name = User::RowCount2, Direction = Output, Parameter Name = 0

    - Configured: Result Set with Result Name = 0, Variable Name = User::RowCount2

    but still can't seem to get the updated row count back.

    I'm stuck with doing this as a SQL Task (verses as a DFT, setting Db source & targets, and including a Row Count Transform Task) and using the OLE DB driver. Does that perhaps preclude being able to get a response back on how many rows were updated?

    I also tried to get the count by setting a Script Task to receive the RowCount variable and display it that way. This only resulted in either a 0 or -1 response being displayed.

    Thanks for any assistance you can provide.

    _____________________________________________________________
    [font="Comic Sans MS"]I'm constantly amazed when I learn about what I never knew that I didn't know.[/font]:smooooth:

Viewing post 1 (of 1 total)

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