IP 주소 자리수 맞추기
아이피의 자리수를 맞춰주는 쿼리
with t as ( select '192.168.254.1' ip from dual ) select replace('.'||ip, '.', '.00') str1 , regexp_replace(replace('.'||ip, '.', '.00'), '([0-9]{3}(\.|$))|.', '\1') str2 from t ; STR1 STR2 ---------------------- --------------- .00192.00168.00254.001 192.168.254.001참고사이트 : http://www.oracleclub.com/article/47497
최신 댓글