CREATE OR REPLACE FUNCTION XXXXXXX.F_CODE_VALUE ( P_CODE IN S_CODE.CODE%TYPE, P_UP_CODE IN S_CODE.UP_CODE%TYPE ) RETURN VARCHAR2 IS R_CODE_VALUE S_CODE.CODE_VALUE%TYPE; BEGIN SELECT CODE_VALUE INTO R_CODE_VALUE FROM S_CODE WHERE 1=1 AND CODE = P_CODE AND UP_CODE = P_UP_CODE; RETURN R_CODE_VALUE; EXCEPTION WHEN OTHERS THEN RETURN 'NULL'; END F_CODE_VALUE; |
CREATE OR REPLACE FUNCTION YYYYYYY.F_ITEM_PICTUREURL ( P_ITEMID IN ITEM.ITEMID%TYPE ) RETURN VARCHAR2 IS R_ITEM_PICTUREURL ITEM.PICTUREURL%TYPE; BEGIN SELECT PICTUREURL INTO R_ITEM_PICTUREURL FROM ITEM WHERE ITEMID = P_ITEMID; RETURN R_ITEM_PICTUREURL; EXCEPTION WHEN OTHERS THEN RETURN 'NULL'; END F_ITEM_PICTUREURL; |
'프로그램 > DB' 카테고리의 다른 글
[펌] 오라클 페이징 처리 방법 (0) | 2012.06.08 |
---|---|
Oracle Procedure - 01 (0) | 2012.03.11 |
[펌] 명시적 커서 (0) | 2012.01.30 |
[펌] 프로시저(Procedure) (0) | 2012.01.30 |
[펌] 함수(Function) (0) | 2012.01.30 |