Using Row Count data flow transformations

Posted by Jeff Rix on January 19, 2012 under SSIS | Be the First to Comment

Create an Int32 user variable with a package scope. Configure the Row Count property Custom Properties>Variable Name to the user variable.

image

You cannot use the Row Count variable in the same dataflow it is set because it is processing the records and sending them to the destination at the same time.

to use in the variable in an Execute SQL Task use an ADO.Net Connection Type and map the variable to an input parameter with the same data type using a parameter name that starts with the @ character.

image

In your query reference the variable using the parameter name and you will be all set!