Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import data from excel into SQL table 1

Status
Not open for further replies.

munchen

Technical User
Aug 24, 2004
306
GB
I have created a blank db table in Microsoft SQL Management Studio 2005 and I have all the data in an excel file (Excel 2007).

Is there a simple way to import the data from excel into my newly created table?

Can I do an insert into?
 
Try using Import/Export Wizard from SSMS. Right click on the database, Tasks, Import...
 
You might also want to do a search on BOL for sp_addLinkedServer.

You can use this to run a SQL query against a named range or spreadsheet. (order by, sum(),select etc....)

All the code you need to connect directly to an excel workbook is shown in the examples.

For what it is worth.


Rob
 
Munchen,
If the datatypes are same in SQL server and excel, just COPY-PASTE required data from excel to sql server table.
(copy from excel by selection and paste by ctrl+v in opened table in Sql server)

Mahendra Hegde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top