Solved

Automated Import of csv into SQL Server 2008 Express

Posted on 2009-04-06
2
1,068 Views
Last Modified: 2012-06-27
I have SQL Server 2008 installed. I generate a csv file everyday and I want this file to be imported into the a specific table in this database. I need for the data in the table to be overwritten by this import.

Any way to do this?
0
Comment
Question by:ralphcarter2008
2 Comments
 
LVL 18

Expert Comment

by:jmoss111
ID: 24082799
Is the SQL table in the same format as the .csv? You can use a TRUNCATE TABLE and a BULK INSERT to push the file.
0
 
LVL 25

Accepted Solution

by:
reb73 earned 500 total points
ID: 24082819
You can use BCP or the OPENDATASOURCE/OPENROWSET TSQL commands (using the Microsoft Jet 4.0 text driver to read this as a set based table) if the csv fles are available in a location that is accessible by the SQL Server Service..

See EE PAQ link below -

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_24098776.html?sfQueryTermInfo=1+10+csv+file+opendatasourc

 
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

820 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