create
    function FN_GET_CARD_CODE(I_PG_GB varchar(20), I_CARD_CD varchar(10)) returns varchar(150) deterministic
BEGIN

DECLARE O_RET_VALUE VARCHAR(150);

SELECT COM_CARD_CD
    INTO   O_RET_VALUE
FROM   TB_PG_CARD
WHERE  PG_GB = I_PG_GB
    AND CARD_CD = I_CARD_CD
;

RETURN O_RET_VALUE;

END;