不理解oracle的function是怎么用的,
CREATEORREPLACETYPEobj_NA_Issued_Exclude_NILNA
ASOBJECT
(
TOTAL_CASESVARCHAR2(500),
OBJECTED_CASESVARCHAR2(500),
NA_ISSUED_MONTHVARCHAR2(20),
PERCENTAGEVARCHAR2(12),
MET_TARGETVARCHAR2(10)
)
/
CREATEORREPLACETYPEtbl_NA_Issued_Exclude_NILNA
ASTABLEOFobj_NA_Issued_Exclude_NILNA
/
FUNCTIONgetNAIssuedExcludeNILNA(
NAIssuedDateFromVARCHAR2,
NAIssuedDateToVARCHAR2,
KPIObjectionRateVARCHAR2)
RETURNtbl_NA_Issued_Exclude_NILNA
IS
NA_Issued_Exclude_NILNA_TBLtbl_NA_Issued_Exclude_NILNA:=tbl_NA_Issued_Exclude_NILNA();
CURSORNA_Issued_Exclude_NILNA_CURIS
SELECT*FROMDUAL;
BEGIN
FORNA_Issued_Exclude_NILNA_RECINNA_Issued_Exclude_NILNA_CUR
LOOP
NA_Issued_Exclude_NILNA_TBL.EXTEND;
NA_Issued_Exclude_NILNA_TBL(NA_Issued_Exclude_NILNA_TBL.LAST):=obj_NA_Issued_Exclude_NILNA(NA_Issued_Exclude_NILNA_REC.TOTAL_CASES,NA_Issued_Exclude_NILNA_REC.OBJECTED_CASES,NA_Issued_Exclude_NILNA_REC.NA_ISSUED_MONTH,NA_Issued_Exclude_NILNA_REC.PERCENTAGE,NA_Issued_Exclude_NILNA_REC.MET_TARGET);
ENDLOOP;
RETURNNA_Issued_Exclude_NILNA_TBL;
--EndFunction
ENDgetNAIssuedExcludeNILNA;