Take the 2-minute tour ×
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. It's 100% free, no registration required.

I want to know how to migrate data from spreadsheet to SQL server

share|improve this question

migrated from stackoverflow.com May 9 '11 at 12:35

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

    
which version ? SQL Server 2008? –  Coder Hawk 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? –  Coder Hawk 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. –  Coder Hawk May 9 '11 at 7:34

4 Answers 4

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

share|improve this answer

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: http://msdn.microsoft.com/en-us/library/ms169917.aspx

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

 
discard

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