DinoVaught
March 1st, 2005, 02:41 PM
Does anyone know how to return multiple rows and records from a stored procedure or function in Oracle?
I have procedures like . . .
PROCEDURE p_Get_UOM_RV(pOrg_Code IN VARCHAR2,
pUOM_Out OUT VARCHAR2)
IS BEGIN
IF pOrg_Code IN ('A','B','C','D') THEN
pUOM_Out := 'METRIC';
ELSE
pUOM_Out := 'IMPERIAL';
END IF;
END p_Get_UOM_RV;
That return a single value. This seems straight forward to me but how do you return multiple records / fields from a stored procedure / function?
I have procedures like . . .
PROCEDURE p_Get_UOM_RV(pOrg_Code IN VARCHAR2,
pUOM_Out OUT VARCHAR2)
IS BEGIN
IF pOrg_Code IN ('A','B','C','D') THEN
pUOM_Out := 'METRIC';
ELSE
pUOM_Out := 'IMPERIAL';
END IF;
END p_Get_UOM_RV;
That return a single value. This seems straight forward to me but how do you return multiple records / fields from a stored procedure / function?