/***
存储过程名称:
p_GroupScore
说明:
团队业绩统计
调用主存储过程:
手工调用
CALL p_GroupScore('E000100')
参数传递:
测试在SQL*PLUS下进行
VAR r refcursor;
Exec p_GroupScore(32,'E000100',:r);
print r;
原型示例
create or replace procedure p_test(p_cur out sys_refcursor)
as
begin
open p_cur for
select '001' XH,'自动化工程系' DM from DUAL
UNION
select '002' XH,'计算机工程系' DM from DUAL
UNION
select '003' XH,'机械工程系' DM from DUAL;
end p_test;
测试在SQL*PLUS下进行
VAR r refcursor;
Exec p_test(:r);
print r;
***/
CREATE OR REPLACE PROCEDURE p_GroupScore(uISSUE NUMBER,uPID IN VARCHAR2,p_cur out sys_refcursor)
AS
BEGIN
IF (uPID = 'E000100') THEN
-- 徐桂玲团队
OPEN p_cur for
SELECT FGRADE,FTYPE,SUM(FCOIN) FROM APP_DETAILS WHERE FISSUE = uISSUE AND FTYPE <> '购物币'
AND
FPID IN
(
SELECT FCPID FRO
ORACLE下存储过程返回查询结果
最新推荐文章于 2022-08-18 15:58:22 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)