create or replace procedure tmpToSys as
begin
--不存在的导入
insert into wt_sys
select * from wt_tmp
where not exists(select 0 from wt_sys where id=wt_tmp.id);
commit;
--更改sys表中的纪录
update wt_sys set (field1,field2....)=(select * from wt_tmp where id=wt_sys.id)
where id in (select id from wt_tmp);
commit;
end;在delphi中,创建一个adoStoreProc控件adosp_tmpToSys,将其procedure_name设为上面过程名称。
调用:
adosp_tmpToSys.execPROC;
begin
--不存在的导入
insert into wt_sys
select * from wt_tmp
where not exists(select 0 from wt_sys where id=wt_tmp.id);
commit;
--更改sys表中的纪录
update wt_sys set (field1,field2....)=(select * from wt_tmp where id=wt_sys.id)
where id in (select id from wt_tmp);
commit;
end;在delphi中,创建一个adoStoreProc控件adosp_tmpToSys,将其procedure_name设为上面过程名称。
调用:
adosp_tmpToSys.execPROC;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货