Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Import from multiple flat files to multiple tables

Author  Topic 

diwakar_m
Starting Member

19 Posts

Posted - 2009-04-17 : 08:36:38
Is there a way to import from multiple files into multiple tables?

Thanks in advance.

nr
SQLTeam MVY

12543 Posts

Posted - 2009-04-17 : 08:56:23
Yes - but with ssis you will need a different dataflow defined for each import (if they have different structures).
This is easiest if you generate the ssis package (or different packages) from the table structures.
If they have the same structure then you can loop through the files and set the source and destination within the loop.

Another option is to use bcp which can handle different file structures.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

diwakar_m
Starting Member

19 Posts

Posted - 2009-04-17 : 09:03:28
Thanks for the pointers mate.
Go to Top of Page
   

- Advertisement -