How to add an incremental counter in a SQL Server 2005 Integration Services package by using a Script component in a Data Flow task (908460)
The information in this article applies to:
- Microsoft SQL Server 2005 Developer Edition
- Microsoft SQL Server 2005 Enterprise Edition
- Microsoft SQL Server 2005 Standard Edition
INTRODUCTIONWhen you create a Microsoft SQL Server 2005 Integration Services
(SSIS) package by using Business Intelligence Development Studio,
you can add an incremental counter at any point of a data flow by using a Script
component in a Data Flow task. For example, you may want to have an
incremental counter inserted per row after a data source. Then, you can record
and identify the count of the rows that are successfully loaded and redirect
the rows that are not loaded. If you are only interested in a final count, you can use a Row Count transformation to add a counter. The difference between using a Script component to add a counter and using a Row Count transformation to add a counter is the following: - A Script component
adds an incremental value to your data flow as a new column value in each row.
- A Row Count
transformation adds and updates the current counter value to a single user-defined
variable.
REFERENCESFor more information, see the following topics in SQL
Server 2005 Books Online:
- SQL Server Integration Services (SSIS)
- Script component
- Configuring the Script component
- Coding and testing the Script component
- Row Count transformation
Modification Type: | Major | Last Reviewed: | 3/11/2006 |
---|
Keywords: | kbsql2005ssis kbhowto KB908460 kbAudDeveloper kbAudITPRO |
---|
|