求一sql 谢谢
把12.1.132 换成 0012.0001.0132
就是把数字换成四位数的 不足四位的在前面补0
写了个
select regexp_replace('12.1.132','(\d+)',lpad('\1',4,0)) from dual
错的好厉害
谢谢
[解决办法]
SELECT REPLACE(WMSYS.WM_CONCAT(X) ,',','.') AS R
FROM
(
SELECT LPAD(REGEXP_SUBSTR('12.1.132', '[^.]+', 1, LEVEL),4,0) AS X
FROM DUAL
CONNECT BY LEVEL <=LENGTH(REGEXP_REPLACE('12.1.132', '[^.]+', ''))+1
)