I have a problem with my SQL script:
SELECT SP.[MobileNumber], SP.[LastName], SP.[FirstName] FROM SampleTable1 SP INNER JOIN OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\devpc11\sample.xls;', 'SELECT MobileNumber, LastName, FirstName FROM [SampleData$]') T ON SP.[MobileNumber] = T.[MobileNumber] GO
when I try to execute this, it generates this error:
Msg 7357, Level 16, State 2, Line 1 Unable to process the object "SELECT Mobile number, Last name, First name FROM [SampleData $]". The OLE DB provider "Microsoft.Jet.OLEDB.4.0 for the linked server" (null) "indicates that either the object does not have columns or the current user does not have permissions for this object.
Is there any solution for this? I really can't find them in the last 3 hours. Basically, I just want to manipulate the data from the excel file and then save it in the sql server 2005 database, but at the moment I want to get the data from the excel file for the sql server .. thanks for the help ..
source share