Paste: inst what?

Author: ageldama
Mode: pl-sql
Date: Thu, 19 Mar 2009 06:37:42
Plain Text |
CREATE OR REPLACE FUNCTION BANK1CTR.FT_AML_T300ACCOUNTNUM(AccountNum IN Char)
RETURN varchar2
IS
  result_String  varchar2(30);
BEGIN
    result_String := '';
    select CASE WHEN length(trim(AccountNum)) between 14 and 15 then substr(AccountNum,1,6)||'-'||substr(AccountNum,7,2)||'-'||substr(AccountNum,9)
                ELSE trim(AccountNum) END 계좌번호
    into result_String
    from dual;
    RETURN(result_String);
END;
/


CREATE OR REPLACE FUNCTION BANK1CTR.FT_AML_T300CUSTNUM(CustNum IN Char)
RETURN varchar2
IS
  result_String  varchar2(30);
BEGIN
    result_String := '';
    select CASE WHEN length(trim(CustNum)) = 13 then substr(CustNum,1,6)||'-'||substr(CustNum,7)
                WHEN length(trim(CustNum)) = 10 then substr(CustNum,1,3)||'-'||substr(CustNum,4,2)||'-'||substr(CustNum,6)
                ELSE trim(CustNum) END 고객번호
    into result_String
    from TSAMLCM20
    where 영업년월일1 = '20050101';
    RETURN(result_String);
END;
/


GRANT EXECUTE ON  BANK1CTR.FT_AML_T300CUSTNUM TO AML000;

GRANT EXECUTE ON  BANK1CTR.FT_AML_T300ACCOUNTNUM TO AML000;

New Annotation

Summary:
Author:
Mode:
Body: