티스토리 뷰

Database

[ORACLE]전화번호 자르기! (-) 기준

애플자라 2012. 6. 20. 10:49
반응형

nvl( Substr( Bbs_Mar_Buy_Tel, 0, Instr(Bbs_Mar_Buy_Tel,'-')-1 ) , ' ')  AS BBS_HP_1,
            nvl( Substr(Substr(Bbs_Mar_Buy_Tel, Instr(Bbs_Mar_Buy_Tel,'-')+1), 0, Instr( Substr(Bbs_Mar_Buy_Tel, Instr(Bbs_Mar_Buy_Tel,'-')+1) , '-')-1) , ' ' ) AS BBS_HP_2,
            nvl( Substr(Substr(Bbs_Mar_Buy_Tel, Instr(Bbs_Mar_Buy_Tel,'-')+1), Instr( Substr(Bbs_Mar_Buy_Tel, Instr(Bbs_Mar_Buy_Tel,'-')+1) , '-')+1) , ' ' )  AS BBS_HP_3,

'000-000-0000';
'000-0001-0000';
'00-001-0000';

전화번호 자르기~!

출처 - http://damipic.tistory.com/entry/Oracle-%EC%A0%84%ED%99%94%EB%B2%88%ED%98%B8-%EC%9E%90%EB%A5%B4%EA%B8%B0-%EA%B8%B0%EC%A4%80

반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함