SELECT SUBSTR(VAL, 1, INSTR(VAL, '-', 1, 1) - 1) VAL_1
, SUBSTR(VAL, INSTR(VAL, '-', 1, 1) + 1, INSTR(VAL, '-', 1, 2) - INSTR(VAL, '-', 1, 1) - 1) VAL_2
, SUBSTR(VAL, INSTR(VAL, '-', 1, 2) + 1) VAL_3
FROM (SELECT '000-000-0000' VAL
FROM DUAL)
오라클용인데요 DB2에서도 될꺼 같은데 잘안되네요 아시는분 답변 부탁드려요 ^^
|