日期:2014-05-17 浏览次数:21120 次
--声明包头
CREATE OR REPLACE PACKAGE PACK_defectsCount AS
TYPE CUR_defectsCount IS REF CURSOR;
PROCEDURE up_defectsCount(startdate in date,
enddate in date,
p_cur out CUR_defectsCount);
END PACK_defectsCount;
--声明包体
CREATE OR REPLACE PACKAGE BODY PACK_defectsCount AS
PROCEDURE up_defectsCount(startdate in date, enddate in date, p_cur out CUR_defectsCount) IS
sqlString varchar2(1000);
BEGIN
sqlString := 'SELECT
'''' abbreviation,
'''' FindCount,
'''' CompleteCount,
'''' OvertimeCount,
'''' CompleteRate,
'''' FindCount1,
'''' CompleteCount1,
'''' OvertimeCount1,
'''' CompleteRate1,
'''' FindCount2,
'''' CompleteCount2,
'''' OvertimeCount2,
'''' CompleteRate2,
'''' FindCount3,
'''' CompleteCount3,
'''' OvertimeCount3,
'''' CompleteRate3
FROM dual
WHERE startdate =: startdate
AND enddate =: enddate';
OPEN p_cur FOR sqlString USING startdate,enddate;
END up_defectsCount;
END PACK_defectsCount;
OPEN p_cur FOR sqlString USING startdate,enddate;这行,求助我这哪里写的有问题吗,折腾好久了,关于这个的例子也不是很多,灰常捉急。