CNN连接本地数据库。 --如果两张表结构一样: insert into b1 select * from openrowset('SQLOLEDB','192.168.1.11';'sa';'sa','select * from A..A1') --如果两张表结构不一样: insert into b1 (字段1,字段3) select 字段x,字段y from openrowset('SQLOLEDB','192.168.1.11';'sa';'sa','select * from A..A1')
--如果两张表结构不一样: insert into b1 (字段1,字段3) select 字段x,字段y from openrowset('SQLOLEDB','192.168.1.11';'sa';'sa','select * from A..A1')
你好猴哥,我输入了 cn.Execute "insert into b1 select * from openrowset('SQLOLEDB','rahf.gnway.net';'sa';'sa','select * from A..A1')" 提示FORM子句语法错误
之前做从Sql Server 2005 将数据搬到Oracle Server: 我的做法是:两个Connection,先从Sql Server 读数据,然后在使用Command 插入到Oracle Server中。
--如果两张表结构一样:
insert into b1 select * from openrowset('SQLOLEDB','192.168.1.11';'sa';'sa','select * from A..A1')
--如果两张表结构不一样:
insert into b1 (字段1,字段3) select 字段x,字段y from openrowset('SQLOLEDB','192.168.1.11';'sa';'sa','select * from A..A1')
--如果两张表结构不一样: insert into b1 (字段1,字段3) select 字段x,字段y from openrowset('SQLOLEDB','192.168.1.11';'sa';'sa','select * from A..A1')
cn.Execute "insert into b1 select * from openrowset('SQLOLEDB','rahf.gnway.net';'sa';'sa','select * from A..A1')"
提示FORM子句语法错误
我的做法是:两个Connection,先从Sql Server 读数据,然后在使用Command 插入到Oracle Server中。