1
votes

I am trying to import multiple tab delimited files into a sql server table using a SSIS package. I set the flat file source and created a flat file connection manager but I was told I will need to create multiple flat file sources for this. This cannot be true right? Is there not someway I can use a loop and the source folder directory location?

2
are all of the flat files in the same format/schema?William Salzman

2 Answers

4
votes

So long as the files are all the same structure, you'd use a for-each loop, of type file. Point it at the folder with the files in, and assign a variable to the file+path. Then use that variable as an expression on the flat file connection manager.

0
votes

Here is a link that shows how to do this: http://www.sqlis.com/sqlis/post/Looping-over-files-with-the-Foreach-Loop.aspx

I like the layout and the graphical indicators used on that page.