1

I have values like these in data input and I have not been able to convert those with parenthesis to a negative numeric. I am using TO_NUMBER(a.Total_Paid,'L999999D99')

Example ($123.45)

It should be -123.45

1 Answer 1

1

Does this work for you? (Note that it does not work for me if I include the L in the format string)

to_number(translate('($123.45)', '()', '<>'), '999999d99PR')
Sign up to request clarification or add additional context in comments.

2 Comments

Without the L it stills removes the $ sign
@Ken Technically, it is ignoring the number sign when parsing the value into a numeric.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.