将一个表的数据导入另一个表中为什么小弟我只能导入一条数据,请
将一个表的数据导入另一个表中为什么我只能导入一条数据,请高手指点
为什么我只能导入一条数据,请高手指点,我的循环写错了吗?
int li_n
int li_count
//dw_1.retrieve()
li_count = dw_1.rowcount()
for li_n = 1 to li_count
sleep(1)
yield()
SELECT "customer"."num",
"customer"."name",
"customer"."telephone",
"customer"."address",
"customer"."conperson"
into :li_num,
: ls_name,
: li_telephone,
:ls_address,
:ls_conperson
FROM "customer"
using sqlca;
INSERT INTO customer
( "num",
"name",
"telephone",
"address",
"conperson" )
VALUES ( :li_num,
:ls_name,
:li_telephone,
:ls_address,
:ls_conperson )
using bizbakdb;
commit;
------解决方案--------------------
晕,你想做啥?
1.从同一个表里读出再放同一个表里?
2.表里所有数据放到变量,变量只能存一个数据.
------解决方案--------------------
你直接一条SQL搞定啊,
insert into b.TB select * from a.TB
------解决方案--------------------
用数据管道试试。
为什么我只能导入一条数据,请高手指点,我的循环写错了吗?
int li_n
int li_count
//dw_1.retrieve()
li_count = dw_1.rowcount()
for li_n = 1 to li_count
sleep(1)
yield()
SELECT "customer"."num",
"customer"."name",
"customer"."telephone",
"customer"."address",
"customer"."conperson"
into :li_num,
: ls_name,
: li_telephone,
:ls_address,
:ls_conperson
FROM "customer"
using sqlca;
INSERT INTO customer
( "num",
"name",
"telephone",
"address",
"conperson" )
VALUES ( :li_num,
:ls_name,
:li_telephone,
:ls_address,
:ls_conperson )
using bizbakdb;
commit;
------解决方案--------------------
晕,你想做啥?
1.从同一个表里读出再放同一个表里?
2.表里所有数据放到变量,变量只能存一个数据.
------解决方案--------------------
你直接一条SQL搞定啊,
insert into b.TB select * from a.TB
------解决方案--------------------
用数据管道试试。