I'd like to ask you with help with a TO_CHAR method in Oracle SQL.
TO_CHAR(Number_parameter,'9999D99','NLS_NUMERIC_CHARACTERS = ''. ''') vc_num,
Number_Parameter is coming in as a decimal number with usual values between 10.10 to 1999.99 (but not limited to them) I need to create a VARCHAR with the smallest representation of the value with at most 2 decimal points. My problem is that I have not found a mask that would satisfy my needs.
I need 200.99 as '200.99'
but 10.1 as '10.1'
while now I am getting ' 10.1 '
(with the white spaces, which I do not want) also 150 should translate to '150'
and not '150.00'
Can you help me please?