Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know how to migrate data from spreadsheet to SQL Server.

share|improve this question

migrated from May 9 '11 at 12:35

This question came from our site for professional and enthusiast programmers.

which version ? SQL Server 2008? – CoderHawk May 9 '11 at 6:43
How is this a programming question? – ybakos May 9 '11 at 6:44
are you using SQL Server Management Studio? – CoderHawk May 9 '11 at 6:44
i'm using SQL server mgmt studio – Anonymous May 9 '11 at 6:46
You can import excel to database using import/export wizard. – CoderHawk May 9 '11 at 7:34

Unless the data you are importing is very simplistic using SSMS (Sql Server Management Studio) tends to produce a lot of errors and not a lot of actual data.

I find that if my spreadsheet (and/or csv, txt file) is very large or has large text fields, or date/time fields I almost always end up using SQL Server Integration Services (SSIS).

The first time you use it, it can be very frustrating. But once you get the hang of it, it's actually quite powerful.

Here is a good tutorial to get you started:

share|improve this answer

In SMSS you can right click a database and select Tasks -> Import data.

share|improve this answer

Things you are likely to need to do include, preferably before you move any data:

  • Normalize
  • Add constraints (keys, domain checking, referential integrity, validation, etc).

Both are fairly huge topics :)

share|improve this answer

For real simple spreadsheets I manually create the table and then convert the spreadsheet into insert statements. I then paste those insert statements directly into SQL Query Analyzer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.