The leading space is for the sign. If you are sure you use only positive numbers you can remove the sign token with a substring. If you have a sign you can put it at the end if you want like this:
99999D00S
Question
I write a select:
select orderid,
unitprice*(1-discount)*quantity as "a",
to_char(unitprice*(1-discount)*quantity, '99999D99') as "SUM"
from OrderDetails
where unitprice*(1-discount)*quantity > 5000
Result is:
How delete only first space?
Mask for char (only 8 symbols):
[number/space][number/space][number/space][number/space][number].[number][number]
If use 'FM', when result:
But, i need:
Solution
The leading space is for the sign. If you are sure you use only positive numbers you can remove the sign token with a substring. If you have a sign you can put it at the end if you want like this:
99999D00S
OTHER TIPS
It appears that you want the format mask of your to_char
to be fm9999D00
, i.e.
to_char(unitprice*(1-discount)*quantity, 'fm99999D00') as "SUM"