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

Calculate Running Count during data import

$
0
0

We have a flat file data source with Invoice records.

Each invoice is bounded by two key "START" and "END". Each Invoice has multiple transactions

================ START ...

TXN1

TXN2 ... END START ...

TXN1

TXN2

TXN3 ... END ================

In the example above, there are 2 invoices IN_A and IN_B. It is targeted to import those records into single DB table.

The problem is the additional requirement that we need a running count as a "Key" in each row to group the invoice. As shown in above example, the table result will be

K1, TXN1

K1, TXN2

K2, TXN1

K2, TXN2

K2, TXN3

where K1 and K2 are the running keys

I know how to do that in .NET. I am not familiar in SSIS and not sure whether it is possible to do the stuff.

If it is possible to do that, please let us know. Thank you very much for your help.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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