我想从Excel导出MSsql SERVER 2008中的数据,但我有错误
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Bookmark is invalid.". Msg 7343,Level 16,State 2,Line 1 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" could not INSERT INTO table "[Microsoft.ACE.OLEDB.12.0]".
我的查询
告诉我,为什么我会收到错误?我需要做什么?
解决方法
尝试这个
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 8.0;Database=C:\Export.xls;','SELECT id_sale FROM [ExportSheet$]') SELECT id_sale FROM dbo.Sale
要么
INSERT INTO OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=C:\Export.xls;Extended Properties=EXCEL 8.0')...[ExportSheet$] SELECT id_sale FROM dbo.Sale