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

Loop to create multiple Flat Files

$
0
0

I have a table with 2 million recs. I have used OLEDB source SQL command to split the recs into 5 batches.

Example 

select * from table where number between 0 and 100 -> result of this stored in flat file with name 'File1.txt'

select * from table where number between 200 and 300 -> result of this stored in flat file with name 'File2.txt'

and so on.

i have created a Data Flow Task -> within that I have multiple OLEDB source and Flat File pairs.

Currently have 5 diff flat file connection and it might increase to 20. how to avoid this and use single connection to create all files.

Thanks in Advance


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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