Hi,
I have created a linked server for an Excel worksheet as
EXEC sp_addlinkedserver 'ExcelSource',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'c:\aflavin\ExcelFies\SampleDatabase.xls',
NULL,
'Excel 5.0'
GO
I now need to write a Stored Procedure that pulls all the data in the excel file. I am trying to use OPENQUERY but don't know how to write the query. What do I use in the FROM part of the query?
SELECT *
FROM OPENQUERY(ExcelSource, 'SELECT * ?????')
Thanks in advance,
Ann
I have created a linked server for an Excel worksheet as
EXEC sp_addlinkedserver 'ExcelSource',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'c:\aflavin\ExcelFies\SampleDatabase.xls',
NULL,
'Excel 5.0'
GO
I now need to write a Stored Procedure that pulls all the data in the excel file. I am trying to use OPENQUERY but don't know how to write the query. What do I use in the FROM part of the query?
SELECT *
FROM OPENQUERY(ExcelSource, 'SELECT * ?????')
Thanks in advance,
Ann