-1

I'm trying to import a large number of flatfiles using SSIS, but the thing is I wanted to use foreach, so that it could get the name of the file and use it as the table destination name.

For example:

Flat File name: ExampleOfFile.txt

foreach executes, gets the file's name and stores in variable @FileName

Destination table: [dbo].[ExampleOfFile]

Do you guys have any thoughts on how to do this?

Thanks!

1 Answers1

0

This post shows a great example. Check other posts by Jaime to find out just about how to do anything in SSIS: http://consultingblogs.emc.com/jamiethomson/archive/2005/05/30/SSIS_3A00_-Enumerating-files-in-a-Foreach-loop.aspx

Mark Wojciechowicz
  • 4,287
  • 1
  • 17
  • 25