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

How to generate unique IDs with XML Source to OLE DB Destination inside Foreach Container

$
0
0

I have a Data Flow Task that contains an XML Source which writes to a SQLServer database.

It writes as expected with a single source file. 

In a Foreach container it writes multiple files as expected...

...however the auto-generated record IDs reset on each iteration of the Foreach container, creating duplicate ids instead of uniquely identified rows.

e.g., file #1 is processed and IDs 1, 100, 200 are written to tie the OLE DB destination tables together.  Then file #2 is started, and the IDs 1, 100, 200 are reused and the table relations are no longer valid.

I'm using VS2008.  Please and thank you for any assistance.  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>