nitisha
Starting Member
1 Post |
Posted - 2012-04-04 : 02:42:30
|
SELECT A.Standards,A.Areas_of_Difference,A.IFRS,A.US_GAAP,A.Difference1,A.Industry,A.Sub_Industry,A.Business_Process,A.SAP_Module,A.Sub_Module,A.PTransaction,A.Solution.A.Option1,A.Option2,A.Option3,A.Prerequisite FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\Nitisha\TestExcel.xls;HDR=YES;IMEX=1', 'select * from [Sheet1$]') AS A; when I run above query I am facing beloq errorOLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Unspecified error".Msg 7303, Level 16, State 1, Line 1Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".and when I am trying to run below queryINSERT INTO Test_IFRS (IFRS_Standard,AreaOf_Difference,IFRS_Description,USGAAP_Description,Difference1,Industry,Sub_Industry,Business_Process,SAP_Module,Sub_Module,PTransaction,Solution,Option1,Option2,Option3,Prerequisite) SELECT A.Standards,A.Areas_of_Difference,A.IFRS,A.US_GAAP,A.Difference1,A.Industry,A.Sub_Industry,A.Business_Process,A.SAP_Module,A.Sub_Module,A.PTransaction,A.Solution.A.Option1,A.Option2,A.Option3,A.PrerequisiteFROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\Nitisha\TestExcel.xls;HDR=YES;IMEX=1', 'select * from [Sheet1$]') AS A; getting error as The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.but having same no. of columns in INSERT and SELECTThanks |
|