Seems you want to convert the string values to money format.
First, consider replace as you did by switching ''
and ','
parameters in the argument order to remove the commas, and making suitable for numeric conversion as :
to_number(replace(nvl(str,0),',',''))
,
and then apply the money format as :
with tableA as
(
select '-100,000' as volume
from dual
)
select to_char(
to_number(replace(nvl(volume,0),',',''))
,'fm999G999G990D00','NLS_NUMERIC_CHARACTERS = ''.,''')
as Money
from tableA;
MONEY
-----------
-100,000.00
Depending on the currency displaying style the order of dot and comma can be switched as
'NLS_NUMERIC_CHARACTERS = '',.'''
to display the money as -100.000,00
.
P.S. first of all, you need to make sure all the data for volume
column can be casted to number to be able to use to_number()
conversion.
Demo