Tuesday, January 18, 2011

Retrieve Records from Excel Using MS SQL

sp_configure

sp_configure 'show advanced options', 1
reconfigure

sp_configure 'Ad Hoc Distributed Queries', 1

reconfigure

sp_configure

SELECT *
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\FPSReport.xls',
'SELECT * FROM [Sheet1$]')

No comments:

Post a Comment