Click here to Skip to main content
15,918,889 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am having so much of records in excel sheet, how to insert these all records into sql table?

like following coding use for it
SQL
SELECT * INTO XLImport3 FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[Customers$]

SELECT * INTO XLImport4 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\test\xltest.xls', [Customers$])

SELECT * INTO XLImport5 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\test\xltest.xls', 'SELECT * FROM [Customers$]')


//what i am using this place-----[Microsoft.jet.OLEDB.4.0] actually i am not using OLEDB CONNECTION, I used SQL Connection.

please check and explain me.

[EDIT]Unchecked option: "Treat my content as plain text, not as HTML"[/EDIT]
Posted
Updated 3-Mar-12 7:22am
v2

1 solution

Refer following link it might help you
http://www.mssqltips.com/sqlservertip/1207/different-options-for-importing-data-into-sql-server/[^]

If it works fine, please accept the solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900