No More Solutions

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

Import data from excel to table in SQL

A friend asked about how to import data from Excel to table in SQL, then I searched for it. Found this code. Having tried it, I think it's a nice idea to share it.

INSERT INTO Table_Name
SELECT column1, column2
FROM OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\ExcelTable.xls', 'SELECT * FROM [Sheet1$]')
Bookmark and Share

0 comments:

Post a Comment