Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS - Continuous row count in a ForEach Loop

$
0
0

Hi there

I currently have a solution that loops through a series of files, transforms and consolidates the data into a single CSV.

As part of this function, I have a row count which is outputted on the latter. This solution now needs an enhancement so that the row count becomes continuous, and I'm not 100% sure how to achieve this.

As an example, the current behaviour: -

File/Row | Rowcount 

File1 Row1 | 1

File1 Row2 | 2

File1 Row3 | 3

File2 Row1 | 1

File2 Row2 | 2

Flle3 Row1 | 1

This is currently achieved with a 'Script Task' in the Data Flow Task of the For Each Loop Container..

But what I want to achieve is...

File/Row | Rowcount 

File1 Row1 | 1

File1 Row2 | 2

File1 Row3 | 3

File2 Row1 | 4

File2 Row2 | 5

Flle3 Row1 | 6

… and I'm not entirely sure how I achieve it, so any help would be much appreciated?

Thanks,

Michael




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>