该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
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语句不能嵌套吗,什么原因,没写过数据存储,求好心人帮忙看看