码迷,mamicode.com
首页 > 数据库 > 详细

oracle存储过程

时间:2017-05-03 09:59:48      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:过程   acl   update   arc   ace   set   use   archive   count   

create  or replace PROCEDURE Pro_fdn_costuser (
v_BZBM in tb_if_archives.BZBM%type,
v_BZMC in tb_if_archives.BZMC%type,
v_CJBM in tb_if_archives.CJBM%type,
v_CJMC in tb_if_archives.CJMC%type,
v_CSRQ in tb_if_archives.CSRQ%type,
v_DWBM in tb_if_archives.DWBM%type,
v_DWMC in tb_if_archives.DWMC%type,
v_GBGRBS in tb_if_archives.GBGRBS%type,
v_GZ in tb_if_archives.GZ%type,
v_GZMC in tb_if_archives.GZMC%type,
v_GZZH in tb_if_archives.GZZH%type,
v_JSDJ in tb_if_archives.JSDJ%type,
v_JSZC in tb_if_archives.JSZC%type,
v_MZ in tb_if_archives.MZ%type,
v_RYBM in tb_if_archives.RYBM%type,
v_RYLB in tb_if_archives.RYLB%type,
v_SFZG in tb_if_archives.SFZG%type,
v_SFZH in tb_if_archives.SFZH%type,
v_XB in tb_if_archives.XB%type,
v_XM in tb_if_archives.XM%type,
v_ZW in tb_if_archives.ZW%type,
v_ZZMM in tb_if_archives.ZZMM%type,
v_GL in tb_if_archives.GL%type,
v_NL in tb_if_archives.NL%type,
v_XL in tb_if_archives.XL%type,
v_INSERT_DATE in tb_if_archives.INSERT_DATE%type
) as
parcount varchar2(10);
begin
select count(0) into parcount from TB_FDN_COSTUSER where xm=v_XM;
if(parcount>0) then
update TB_FDN_COSTUSER set QTXX=v_BZMC,KS=v_CJMC,CSRQ=v_CSRQ,ZDMC=v_DWMC,JSDJ=v_JSDJ,MZ=v_MZ,GZZH=v_RYBM,XB=v_XB,XM=v_XM,ZW=v_ZW,ZZMM=v_ZZMM,
GL=v_GL,NL=v_NL,XL=v_XL,INSERT_DATETIME=v_INSERT_DATE where xm=v_XM;
else
insert into TB_FDN_COSTUSER(QTXX,KS,CSRQ,ZDMC,JSDJ,MZ,GZZH,XB,XM,ZW,ZZMM,GL,NL,XL,INSERT_DATETIME)
values(v_BZMC,v_CJMC,v_CSRQ,v_DWMC,v_JSDJ,v_MZ,v_RYBM,v_XB,v_XM,v_ZW,v_ZZMM,v_GL,v_NL,v_XL,v_INSERT_DATE);
end if;
end;



oracle存储过程

标签:过程   acl   update   arc   ace   set   use   archive   count   

原文地址:http://www.cnblogs.com/daimaxuejia/p/6800314.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!