Solved

how to import multiple CSV files in folder into SQL Server 2012

Posted on 2014-12-22
4
921 Views
1 Endorsement
Last Modified: 2016-02-15
I have SQL Server 2012.  I want to import about 350+ CSV files located in a local folder of SQL 2012 server.  I only need a one-time import at this time.  I am new to SQL Server 2012, but have researched my problem extensively with BCP, Bulk Insert, OPENROWSET, and SSIS. Please assist with the easiest way possible. Thank you.
1
Comment
Question by:blackcatkempo
  • 2
4 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 250 total points
ID: 40513267
Shove them in the same folder, then in SSIS use a For Each File Loop to loop through all files to set the source of a data pump, with the destination being the SQL table.

That assumes that the files are exactly the same schema, and they are inserting into the same SQL table.
1
 

Author Comment

by:blackcatkempo
ID: 40521278
Do you have a good tutorial to follow using Microsoft Visual Studio 2012 Shell (Integrated) SQL Server Data Tools   11.1.41025.0?
0
 
LVL 14

Assisted Solution

by:Vikas Garg
Vikas Garg earned 250 total points
ID: 40521726
Hi,

I think the following link would help you to implement the same.

http://www.mssqltips.com/sqlservertip/2874/loop-through-flat-files-in-sql-server-integration-services/
0
 

Author Closing Comment

by:blackcatkempo
ID: 40522593
Awesome when it finally worked!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now