I want to format mask 3525,18 Need output: 3.525,18
Thank you
Need output: 3.525,18
CodePudding user response:
try it :
SELECT to_char(CAST(SUBSTR('3525,18',0,INSTR('3525,18',',')-1) AS NUMBER),'99G999')||'.'|| SUBSTR('3525,18',INSTR('3525,18',',') 1) from dual
CodePudding user response:
You can use a format mask like '999G990D00'
, which will use your NLS session settings to show the group and decimal separators. Expand the mask as needed to handle the maximum number of digits you will have to display.
If you always want to show the same separators regardless of session settings then, in plain Oracle SQL anyway, you can override the session as part of a to_char()
call:
to_char(your_number, '999G990D00', 'nls_numeric_characters=,.')
I'm unclear quite where you're applying the mask or how it relates to Apex, but you can do that in PL/SQL too.