Pages

Thursday, October 4, 2012

OPENDATASOURCE to pull excel data into SQL Server

How to use OPENDATASOURCE to pull excel data into SQL Server


OPENDATASOURCE is a SQL inbuilt function use to pull data from other data sources by utilising the ODBC drivers.

Syntax to use:

select * from opendatasource('Microsoft.Jet.OLEDB.4.0','Data Source=D:\dba_tcs\test123\SQLDB.xls;Extended Properties=EXCEl 5.0')...[Sheet2$]

Hope the above information helps

Thanks