Steve Olsen
asked on
Execute SQL Statement Against Record set or Array?
I understand its possible to execute a sql statement against an Excel sheet. Is it possible to execute a sql statement against something that's in memory like a record set or array?
ASKER
Thanks Dean.
I read thru the info on OPENROWSET in the page linked to. Here's one of the examples given:
SELECT * FROM OPENROWSET(
‘Microsoft.Jet.OLEDB.4.0’
,‘Excel 8.0;Database=C:\Temp\Order Values.xls ;HDR=YES’
,results) — “results” is a named range in excel
It appears they are using a sheet in Excel (or range within the sheet) as their source. How would I go about using OPENROWSET against something in memory like an array or ADO recordset?
Steve
I read thru the info on OPENROWSET in the page linked to. Here's one of the examples given:
SELECT * FROM OPENROWSET(
‘Microsoft.Jet.OLEDB.4.0’
,‘Excel 8.0;Database=C:\Temp\Order
,results) — “results” is a named range in excel
It appears they are using a sheet in Excel (or range within the sheet) as their source. How would I go about using OPENROWSET against something in memory like an array or ADO recordset?
Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://blog.learningtree.com/using-openrowset-to-read-excel-worksheets-from-sql-server-part-2-linked-sql-queries/