0

I got an Excel file with data which I want to import into a database in Microsoft SQL Server 2008 Express edition.

I do this with right click on a database -> task -> import data.

After this, my data from Excel is loaded in the database in one table.

But I want to seperate the columns from the Excel file into different tables.

So instead of loading all Excel data into one database and table, I want to load the Excel data into one database, but in different tables.

For example: Save column 1,2,3 from Excel in table A, and save column 4,5,6 from Excel in table B.

Anyone that knows how to do this?

Swag
  • 2,090
  • 9
  • 33
  • 63
  • 2
    Personally I would just import into a temporary table then write `INSERT INTO X SELECT` queries to move in the correct columns. – bendataclear Nov 01 '13 at 16:10
  • Did you look at this question? http://stackoverflow.com/questions/375991/import-excel-spreadsheet-columns-into-sql-server-database – Sven Grosen Nov 02 '13 at 02:58
  • @ledbutter Need to re-install my r2 server and will look at this. – Swag Nov 02 '13 at 14:45

1 Answers1

0

I followed the suggestion of @bendataclear:

"Personally I would just import into a temporary table then write INSERT INTO X SELECT queries to move in the correct columns."

Swag
  • 2,090
  • 9
  • 33
  • 63