Hi,
It should be
Use Northwind
GO
insert into Orders -- are you trying to insert into orders???
select OrderID, CustomerID from OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\testing.xls;',
'SELECT OrderID, CustomerID FROM [Sheet1$]')
GO
you can comment out the insert to get the resultset only
select * from OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\testing.xls;',
'SELECT OrderID, CustomerID FROM [Sheet1$]')
GO
------------------------------------------
http://sqlservercode.blogspot.com/