See here in you Management Studio
:
Choose you db?
Choose your source :
and from here is all just following the GUI !!
题
I'm trying to import some data from an Excel sheet into an existing SQL Server 2005 table.
The table has the following columns:
Name, Surname, PhoneNumber ,Bill
and they are in the same order in the Excel sheet.
I've never attempted such a thing before, but after searching for a while I was told I could use:
INSERT INTO table
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\temp\test.xls',
'SELECT * FROM [Sheet1$]')
Do I need to reference the column names from the Excel sheet to the SQL Server table columns?
I'm certainly not a SQL guru, but would consider myself a good beginner.
Can anyone help?
解决方案
See here in you Management Studio
:
Choose you db?
Choose your source :
and from here is all just following the GUI !!