SQL server读EXCEL失败
请求高手支招:
执行:SELECT * into ysz FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=E:\出差补贴额度设置2011-4-1.xls;Extended Properties=EXCEL 5.0')...[国内$]语名时
第一次成功了,但是少了20行数据
但是第二次运行的时候出现以下的错误
链接服务器"(null)"的 OLE DB 访问接口 "Microsoft.Jet.OLEDB.4.0" 返回了消息 "定义了过多字段。"。
消息 7320,级别 16,状态 2,第 1 行
无法对链接服务器 "" 的 OLE DB 访问接口 "" 执行查询"SELECT `Tbl1005`.`核算体系` AS `Col1008`,`Tbl1005`.`F2` AS `Col1009`,`Tbl1005`.`补助标准类型` AS `Col1010`,`Tbl1005`.`F4` AS `Col1011`,`Tbl1005`.`地域` AS `Col1012`,`Tbl1005`.`F6` AS `Col1013`,`Tbl1005`.`职位等级` AS `Col1014`,`Tbl1005`.`住宿限额` AS `Col1015`,`Tbl1005`.`市内交通费限额` AS `Col1016`,`Tbl1005`.`往返机场交通限额` AS `Col1017`,`Tbl1005`.`往返港澳台交通费` AS `Col1018`,`Tbl1005`.`通讯补贴` AS `Col1019`,`Tbl1005`.`就餐补贴` AS `Col1020`,`Tbl1005`.`误餐补贴` AS `Col1021`,`Tbl1005`.`地区差补` AS `Col1022`,`Tbl1005`.`汽车费用` AS `Col1023`,`Tbl1005`.`F17` AS `Col1024`,`Tbl1005`.`F18` AS `Col1025`,`Tbl1005`.`F19` AS `Col1026`,`Tbl1005`.`F20` AS `Col1027`,`Tbl1005`.`F21` AS `Col1028`,`Tbl1005`.`F22` AS `Col1029`,`Tbl1005`.`F23` AS `Col1030`,`Tbl1005`.`F24` AS `Col1031`,`Tbl1005`.`F25` AS `Col1032`,`Tbl1005`.`F26` AS `Col1033`,`Tbl1005`.`F27` AS `Col1034`,`Tbl1005`.`F28` AS `Col1035`,`Tbl1005`.`F29` AS
.
.
.
.
.
请问要怎么解决.
附临时表删除了.SQL重启了
在线等,刚刚注册的,分数不多,谢谢各位了
------解决方案--------------------
------解决方案-------------------- 链接服务器"(null)"的 OLE DB 访问接口 "Microsoft.Jet.OLEDB.4.0" 返回了消息 "定义了过多字段。"。
消息 7320,级别 16,状态 2,第 1 行
查看下,你的数据源和目的的表列数是否匹配.
------解决方案--------------------Extended Properties=EXCEL 5.0 换成 Extended Properties=EXCEL 8.0
试试