Home > database >  Oracle child swallow five all segment value number
Oracle child swallow five all segment value number

Time:10-18


Turn a great god, and how to list some fields such changes, change the rule is: this field is 1.2.45.67 such value is changed to 00001.00002.00045.00067 each number is up with 0 5, o great god answer

CodePudding user response:

Lpao (fields, 5 '0')

CodePudding user response:

reference 1st floor yoyohey response:
lpao (fields, 5 '0')
lpad just wrong, on the right is the rpad

CodePudding user response:

reference 1st floor yoyohey response:
lpao (fields, 5 '0')
estimates that you don't understand I said mean 1.2.45.67 as a whole, rather than four Numbers, and the digital level is 1 to n

CodePudding user response:

 select listagg (lpad (regexp_substr (t1) STR, '[. ^ \] +' 1, level), 5 '0'), '. ') within group (order by level) 
The from (
Select '1.2.33.44.555.6666.77777 STR from dual
) t1
Connect by the prior t1. STR=t1. STR
And the prior sys_guid () is not null
And level & lt;=regexp_count (t1) STR, '\.') + 1

CodePudding user response:

reference chenxun0825 reply: 3/f
Quote: refer to 1st floor yoyohey response:
lpao (fields, 5 '0')
estimates that you don't understand I said mean 1.2.45.67 as a whole, rather than four Numbers, and digital level is 1 to n layer

Oh oh, that is right downstairs
  • Related