oracle存过的if,存储过程的if问题

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

sql是:create or replace

procedure PRO_AC_SAPCHECK(

T_DZ_SAPYFINDOC in SAPCHECK%ROWTYPE,

-- T_DZ_SFFDOCDETAIL in SFFCHECK%ROWTYPE,

out_state out CHARACTER,

out_message out VARCHAR2

)

as

--定义M表变量

TYPE type_recode is record(

sap_sapdate SAPCHECK.sapdate%type,

sap_comcode SAPCHECK.comcode%type,

sap_checkno SAPCHECK.checkno%type,

sap_dealno SAPCHECK.dealno%type,

sap_gsdm SAPCHECK.gsdm%type,

sap_cerno SAPCHECK.cerno%type,

sap_policyno SAPCHECK.policyno%type,

sap_kmdm SAPCHECK.kmdm%type,

sap_amount SAPCHECK.amount%type,

sff_sffdate SFFCHECK.sffdate%type,

sff_comcode SFFCHECK.comcode%type,

sff_dealno SFFcheck.dealno%type,

sff_policyno SFFCHECK.policyno%type,

sff_kindcode SFFCHECK.kindcode%type,

sff_realamount SFFCHECK.realamount%type);

use_recode_sapandsff use_recode;

--定义游标

cursor sap_cursor is select sapdate,comcode,checkno,dealno,gsdm,cerno,policyno,kmdm,amount from T_DZ_SAPYFINDOC;

cursor sff_cursor is select sffdate,comcode,dealno,policyno,kindcode,realamount from T_DZ_SFFDOCDETAIL;

BEGIN

open sap_cursor;

open sff_cursor;

--判断sap的dealno不为空

if not T_DZ_SAPYFINDOC.dealno is null then

T_DZ_SAPYFINDOC.

--判断sff的dealno不为空,并且sap和sff相等的amount

if not T_DZ_SFFDOCDETAIL.dealno is null and in_sapcheck.dealno = in_sffcheck.dealno then

--判断新财务的amount和收付费的realamount是否相等

if in_sffcheck.amount = in_sffcheck.realamount then

--状态更改成对账成功核销

out_message := '对账成功核销';

DBMS_OUTPUT.put_line(对账成功);

end if;

end if;

end if;

DBMS_OUTPUT.put_line('haha');

close sap_cursor;

close sff_cursor;

--转存

END PRO_AC_SAPCHECK;

编译错误的

错误(38,13): PLS-00103: Encountered the symbol "IF" when expecting one of the following:current delete exists prior错误(46,9): PLS-00103: Encountered the symbol "IF" when expecting one of the following: ;[url]http://current delete exists prior [/url]

if语句不能嵌套吗,什么原因,没写过数据存储,求好心人帮忙看看

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值