create or replace procedure yyp_wbcf(dhhm varchar,cxjg out varchar) is
v_count number;
name varchar(20);
qf number;
begin
select count(*) into v_count from yxv_csy where YX_SJ=dhhm;
if v_count=0 then
select count(*) into v_count from yxv_csy where yx_lxdh=dhhm;
if v_count=1 then
select yx_yfmc into name from yxv_csy where yx_lxdh=dhhm;
select qf_ze into qf from yxv_csy_yjsfze where yx_lxdh=dhhm;
cxjg := '';
else
select sum(qf_ze) into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
end if
else
if v_count=1 then
select yx_yfmc into name from yxv_csy where yx_sj=dhhm;
select qf_ze into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
else
select sum(qf_ze) into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
end if
end if;
end yyp_wbcf;报这个错:
Compilation errors for PROCEDURE YX_GLXT.YYP_WBCFError: PLS-00103: Encountered the symbol "ELSE" when expecting one of the following:
;
The symbol ";" was substituted for "ELSE" to continue.
Line: 19
Text: elseError: PLS-00103: Encountered the symbol "END" when expecting one of the following:
;
The symbol ";" was substituted for "END" to continue.
Line: 30
Text: end if;
v_count number;
name varchar(20);
qf number;
begin
select count(*) into v_count from yxv_csy where YX_SJ=dhhm;
if v_count=0 then
select count(*) into v_count from yxv_csy where yx_lxdh=dhhm;
if v_count=1 then
select yx_yfmc into name from yxv_csy where yx_lxdh=dhhm;
select qf_ze into qf from yxv_csy_yjsfze where yx_lxdh=dhhm;
cxjg := '';
else
select sum(qf_ze) into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
end if
else
if v_count=1 then
select yx_yfmc into name from yxv_csy where yx_sj=dhhm;
select qf_ze into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
else
select sum(qf_ze) into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
end if
end if;
end yyp_wbcf;报这个错:
Compilation errors for PROCEDURE YX_GLXT.YYP_WBCFError: PLS-00103: Encountered the symbol "ELSE" when expecting one of the following:
;
The symbol ";" was substituted for "ELSE" to continue.
Line: 19
Text: elseError: PLS-00103: Encountered the symbol "END" when expecting one of the following:
;
The symbol ";" was substituted for "END" to continue.
Line: 30
Text: end if;
解决方案 »
- 关于oracle中存入大块数据
- 请教一个SQL语句,看不用存储过程能做到吗?
- Oracle写批处理文件
- 求教:用脚本实现plsql developer的export user objects功能
- 如何让我的后端程序变成乱码即让其它人看不到我的后端程序,另求 WRAPPED 解释资料或请帮忙讲解! 过程,函数与wrapped的相关使用搭配是不
- 存储过程有错``问教!
- 请教怎样将表字段横向列出来,并找出差异?
- ~~~~急!!~~~请高手给个解决方法,谢谢
- 关于数据库回滚的问题!请高高帮忙!
- 怎样新建一个JOB(任务),来定期删除信息或执行某个存储过程?
- oracle自动递增
- 如何更新oracle中某一列
create or replace procedure yyp_wbcf(dhhm varchar,cxjg out varchar) is
v_count number;
name varchar(20);
qf number;
begin
select count(*) into v_count from yxv_csy where YX_SJ=dhhm;
if v_count=0 then
select count(*) into v_count from yxv_csy where yx_lxdh=dhhm;
if v_count=1 then
select yx_yfmc into name from yxv_csy where yx_lxdh=dhhm;
select qf_ze into qf from yxv_csy_yjsfze where yx_lxdh=dhhm;
cxjg := '';
else
select sum(qf_ze) into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
end if;
else
if v_count=1 then
select yx_yfmc into name from yxv_csy where yx_sj=dhhm;
select qf_ze into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
else
select sum(qf_ze) into qf from yxv_csy where yx_sj=dhhm;
cxjg := '';
end if;
end if;
end yyp_wbcf;