Solved

Automated Import of csv into SQL Server 2008 Express

Posted on 2009-04-06
2
1,073 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.

738 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