to char - Oracle SQL: How do I convert the substrings in a string using to_char -


the to_char works fine when applied single match below.

select to_char('54523234', '99,999,999,999') 

i use regex find match of currencies in string. when apply to_char first group, doesn't work

select regexp_replace ('24444.88, 54523234.78, , 1044.52 numbers in example.',  '(([0-9]+){1,10})+\.([0-9]{2})', to_char('\1'.'99,999,999,999')) dual; 

i want output string displayed like: 24,444.88, 54,523,234.78 , 1,044.52 numbers in example.

here go brother, fun one:

select regexp_replace(regexp_replace ('234234234.88, 24444.88, 54523234.78, , 1044.52 numbers in example.',  '(([0-9]{3})\.)', ',\1'),'(([0-9]{3}),)',',\1') dual 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -