From the course: SQL Server 2008 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Importing CSV files into SQL Server

Importing CSV files into SQL Server - SQL Server Tutorial

From the course: SQL Server 2008 Essential Training

Start my 1-month free trial

Importing CSV files into SQL Server

If the data that you want to import is in comma separated values or indeed in anything that's just a regular text delimited file-- in fact here I've got to some very straightforward values, very similar to the last time, but they are separated with the vertical bar. I can also bring this into SQL Server although the way of doing it does have quite a few different options than doing it with Excel. So I'm going to go ahead and open up my Import and Export Data Wizard. I'm going to use the 32-bit one. The source I'm going to pick here is Flat File Source. And when I select that, not surprisingly it's going to ask me to browse to that file, which is currently saved as a CSV on my desktop. And once I do that we have a very different screen for determining what that data is. If I click on the Columns section on the left, it will take a look and think yes, this column delimiter seems to be a vertical bar, and if you select that, this is what the date is going to look like and it looks pretty…

Contents