SSIS: counting rows.

Hi, I need to count rows in the source flat file. Also, have to count how many were loaded in the destination table.
Thanks.
quasar_eeAsked:
Who is Participating?
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Row Count Transform
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
If we're talking an SSIS package, there is a Row Count transformation that you can insert between the source and destination, that will count the rows in the source and save to a variable.  Then you can use that variable however you wish.

Create an variable, int data type, name it something like 'iRowCount'
Insert the Row Count transform between source and destination in your data flow, connecting the arrows.
Double-click on the Row Count transform, and set the Variable Name property to your variable.

Then, tell us what you wish to do with this count.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
btw, if your company can cough up $1,000 per environment, Pragmatic Works has a suite of components called Task Factory, where the upsert destination task which allows for both inserting and updating as a destination, and it will save the number of rows inserted and updated to variables for later use.

Extremely handy for data warehouse work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.