I have float field that contains (for example): 1234.5678. I would like to display it like a 1 234.56 or 1 234,56. How can I do that?
I used to_char() function that gives me:
SELECT to_char(12345.5678,'99999999999999999D99');
-> 12345,57
but, when I have zero-value...
SELECT to_char(0,'99999999999999999D99');
-> ,00
A zero inside:
SELECT to_char(0,'99999999999999990D99');
-- Second question from the comments: Howto make k-seperator
SELECT to_char (1234567890999999.8,'99 999 999 999 999 990D99');
Here is the online-doku: functions (data-type conversion). Maybe you like to download it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With