Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL Bulk Import

$
0
0

Hello,

I have a one off data import that I am going to place into a newly created table..  I have tried SSIS and it became a pain so I am going to try and import the data and then use t-sql to move the data into the correct columns.  I think that this will be an interersting way to do it as well as helpoing my t-sql coding.  SSIS is usually great but this data is such a mess that I think coding it will be easier in the long run.

What I am trying to do first is to import the whole row into one column.  For instance C:\Data.csv has lines like the following:

Mr,Jo,Bloggs,29 Acacia Road,42,Male

What is the way to import this into a SQL table (nameTable1) all in one column called ImportAll

I think after that substring will help move the parts into the other columns once I get all of the data into SQL.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>