Hi all,
select '387.22' EXTENDED_AMOUNT from dual
union all
select '309.62' EXTENDED_AMOUNT from dual
union all
select ' (1,389.00)' EXTENDED_AMOUNT from dual
union all
select ' (138.90)' EXTENDED_AMOUNT from dual
union all
select ' (5,972.70)' EXTENDED_AMOUNT from dual
I have used below code to get output with negative sign
select LTRIM(rtrim(trim(EXTENDED_AMOUNT),')'),'(')*-1
from dual;
output:
-387.22
-309.62
-138.90
Expected output is:
-387.22
-309.62
-1,389.00
-138.90
-5,972.70