SQL> desc hddrv_cus_sgn
Name Null? Type
----------- -------- --------------------------------------------------------
RCS_WBL_NUM NOT NULL VARCHAR2(14)
RCS_RLT_COD VARCHAR2(2)
RCS_SGN_IMG BLOB
RCS_SGN_YMD DATE
RCS_DLV_ENO VARCHAR2(7)
RCS_CFM_CND VARCHAR2(1)
RCS_BAT_CND VARCHAR2(1)
CREATE OR REPLACE FUNCTION fn_get_cus_sign2(wbl_num IN VARCHAR2) RETURN LONG raw AS
rbuf LONG raw(2000);
len NUMBER(7);
tmp VARCHAR2(4000);
hb BLOB;
BEGIN
SELECT rcs_sgn_img
INTO hb
FROM rtsrv_cus_sgn
WHERE rcs_wbl_num = wbl_num;
len := dbms_lob.getlength(hb);
dbms_lob.READ(hb, len, 1, rbuf);
RETURN rbuf;
EXCEPTION
WHEN others THEN
rbuf := hextoraw('47494638396108000100800000FFFFFF00000021F90400000000002C0000000008000100000203846F05003B');
RETURN rbuf;
END fn_get_cus_sign2;
댓글 없음:
댓글 쓰기