一、
SELECT *
into table1
from OpenRowSet('microsoft.jet.oledb.4.0',';database=d:\yao\yaodata.mdb','select * from ypxx')
用上面的语句导入数据要求当前库中没有表table1,若表table1已存在,只想把Access数据插入table1表,应该如何写?
二、如何导入 binary 字段的数据?
...全文
1213打赏收藏
Access数据导入MS-SQL的问题?
一、 SELECT * into table1 from OpenRowSet('microsoft.jet.oledb.4.0',';database=d:\yao\yaodata.mdb','select * from ypxx') 用上面的语句导入数据要求当前库中没有表table1,若表table1已存在,只想把Access数据插入table1表,应该如何写? 二、如何导入 binary 字段的数据?
if objectproperty(object_id('table1'),'isusertable')=1
insert table1
SELECT *
from OpenRowSet('microsoft.jet.oledb.4.0',';database=d:\yao\yaodata.mdb','select * from ypxx')
else
SELECT *
into table1
from OpenRowSet('microsoft.jet.oledb.4.0',';database=d:\yao\yaodata.mdb','select * from ypxx')