zero padding decimal in oracle [message #300908] |
Mon, 18 February 2008 11:59  |
shalini_apk
Messages: 3 Registered: February 2008
|
Junior Member |
|
|
i'm in need, kindly help
i want to do zero padding on the number which i have.
for eg: 12345.78 i want 4 decimals
ie 12345.7800
for eg: 12345.78 i want 3 decimals
ie 12345.780
i know only the number of decimals that can be given, with this info i need to do zero padding, i can use rpad but i dont know the total number to which we can do padding.
somebody kindly help me on this.
|
|
|
|
|
|
Re: zero padding decimal in oracle [message #300915 is a reply to message #300913] |
Mon, 18 February 2008 12:17   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
Almost, but ...
1) Oracle uses single quotes ('), NOT double quotes (")
2) You are missing the digits in front of the decimal point in the format mask. The way it is now any value greater than one will result in "#####".
More format mask syntaxes and examples are here
[Updated on: Mon, 18 February 2008 12:18] Report message to a moderator
|
|
|
|
|
|
Re: zero padding decimal in oracle [message #305798 is a reply to message #305750] |
Wed, 12 March 2008 01:21   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
msax wrote on Wed, 12 March 2008 01:39 | I see that the first two bullets on the Forum Guide state:
Be polite!
Never belittle anyone for asking beginner-level questions or for their English skills.
BOTH OF WHICH, YOU HAVE VIOLATED, moderator (Michel)
|
Exactly where did Michel
- belittle someone for asking beginner-level questions
- belittle someone for his/her English skills? (Pointing someone to the fact that Oracle uses single quotes instead of double quotes is NOT commenting on language)
|
|
|
Re: zero padding decimal in oracle [message #305800 is a reply to message #305793] |
Wed, 12 March 2008 01:23   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Michel Cadot wrote on Wed, 12 March 2008 07:11 | So you do.
Regards
Michel
|
Same here: Where did msax belittle anyone for asking beginner-level questions of on his/her use of English?
Both of you, quit fighting and focus (back) on the original problem.
|
|
|
|
|
|
|
|
|
|
|