oracle存储过程
Posted 萌橙
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle存储过程相关的知识,希望对你有一定的参考价值。
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存储过程的主要内容,如果未能解决你的问题,请参考以下文章