oracle存储过程实际返回行数 5
OPENCUR_RISK;LOOPFETCHCUR_RISKINTOROW_RISK;IFCUR_ASD%NOTFOUNDTHENEXIT;ELSE-----险种匹配,并...
OPEN CUR_RISK;
LOOP
FETCH CUR_RISK
INTO ROW_RISK;
IF CUR_ASD%NOTFOUND THEN
EXIT;
ELSE
-----险种匹配,并计算保费
SELECT CASE ROW_RISK.aaa
WHEN P.JIAOQIANG_CODE THEN
TO_NUMBER(P.C_CVRG_NO)
WHEN P.CHESHUN_CODE THEN
TO_NUMBER(P.PRM_CHESUN)
WHEN P.SANZHE_CODE THEN
TO_NUMBER(P.PRM_SANZHE)
WHEN P.DAOQIANG_CODE THEN
TO_NUMBER(P.PRM_DAOQIANG)
WHEN P.ZIRANG_CODE THEN
TO_NUMBER(P.PRM_ZIRAN)
WHEN P.ZONGJI_CODE THEN
TO_NUMBER(P.PRM_0360_0362)
ELSE
0
END
INTO V_PUM
FROM CS_RULE_POL P;
V_NUMBER := V_NUMBER + V_PUM;
END IF;
FETCH CUR_RISK
INTO ROW_RISK;
END LOOP; 展开
LOOP
FETCH CUR_RISK
INTO ROW_RISK;
IF CUR_ASD%NOTFOUND THEN
EXIT;
ELSE
-----险种匹配,并计算保费
SELECT CASE ROW_RISK.aaa
WHEN P.JIAOQIANG_CODE THEN
TO_NUMBER(P.C_CVRG_NO)
WHEN P.CHESHUN_CODE THEN
TO_NUMBER(P.PRM_CHESUN)
WHEN P.SANZHE_CODE THEN
TO_NUMBER(P.PRM_SANZHE)
WHEN P.DAOQIANG_CODE THEN
TO_NUMBER(P.PRM_DAOQIANG)
WHEN P.ZIRANG_CODE THEN
TO_NUMBER(P.PRM_ZIRAN)
WHEN P.ZONGJI_CODE THEN
TO_NUMBER(P.PRM_0360_0362)
ELSE
0
END
INTO V_PUM
FROM CS_RULE_POL P;
V_NUMBER := V_NUMBER + V_PUM;
END IF;
FETCH CUR_RISK
INTO ROW_RISK;
END LOOP; 展开
1个回答
2017-08-15
展开全部
oracle存储过程实际返回漏差行源搜巧数
CREATE OR REPLACE PROCEDURE OPE_SELECT (
loginname_i in TBL_OPERATEINFO.loginname%type,
ref_cursor out sys_refcursor
) AS
BEGIN
open ref_cursor for
SELECT name FROM TBL_OPERATEINFO WHERE loginname LIKE '%' || loginname_i || '雹键%' ;
END OPE_SELECT;
CREATE OR REPLACE PROCEDURE OPE_SELECT (
loginname_i in TBL_OPERATEINFO.loginname%type,
ref_cursor out sys_refcursor
) AS
BEGIN
open ref_cursor for
SELECT name FROM TBL_OPERATEINFO WHERE loginname LIKE '%' || loginname_i || '雹键%' ;
END OPE_SELECT;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询