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)
 MOving multiple CSV files in a SQL Server database

Author  Topic 

saurabhsrivastava
Posting Yak Master

216 Posts

Posted - 2009-02-03 : 13:02:53
I have around 50 CVS files to import to a Test database on SQL Server 2008, each CSV belongs to different table and I want to avoid one-by-one import manually. It will be graet If you guys help me find or design SSIS package that does same task.

Thanks for suggestions

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-03 : 13:11:45
just use a for eack loop container to loop over files and use data flow task to transfer data to table(s). data flow task will have flat file source and OLEDB destination.

also see

http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx
http://technet.microsoft.com/en-us/library/ms345182(SQL.90).aspx
Go to Top of Page

saurabhsrivastava
Posting Yak Master

216 Posts

Posted - 2009-02-04 : 13:39:54
Thanks for link but each CSV files have different structure, so this is not gonna work.
Go to Top of Page
   

- Advertisement -