Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing a csv file to a sql server table

Status
Not open for further replies.

Rahel

Programmer
Feb 16, 2000
30
0
0
GB
I need to import a csv file to a table that already exists on SQL Server7.0 on a regular basis.<br><br>I have tried using the import wizard but had no luck. How do I specify the table on SQL Server that will store the data held in the csv file?<br><br>I tried reading the csv file from Excel and copying the data to clipboard but, when you try to paste the contents of the clipboard into your table, there are no paste options and ctrl+v does not work.<br><br>My fix at the moment is to use the import wizard to import the csv file to a new database, then open the newly created database, open the table with the data, select all the records and copying it to clipboard. Now I can paste the records held in clipboard to the table in SQL Server.<br><br>Seems a bit long winded, can anyone suggest a better way of doing this.<br><br>Help!
 
When I run the Import Wizard, there appears a Choose a Destination page where I can choose the destination type (Microsoft OLE DB Provider for SQL Server), Server, and <font color=red>database</font>.&nbsp;&nbsp;This is about the fourth screen that appears in the Wizard. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Try using the Data Transformation Service - a GUI based data manipulation tool accessible through Enterprise Manager.<br><br>You'll need to create a new package, add 2 connections, 1 pointing to your CSV file, the other pointing to your database.&nbsp;&nbsp;You then select the table you wish to load into, and graphically define the mappings between columns in your CSV to those in your table.<br><br>SQL BO contains plenty of relevant info.&nbsp;&nbsp;If you need more specific help, please reply.<br><br>Chris. <p> Chris Lawton<br><a href=mailto: Chris.Lawton@GoldMine.com> Chris.Lawton@GoldMine.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top