I’ve got an oracle query like this:
SELECT floatColum0,floatColum1,ROUND(floatColum2,2) from table;
which is returning values like that:
.2 , 1.23, .23
how can I get something like that? (leading zeros)
0.2, 1.23, 0.23 ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It isn’t the numbers whose leading zeroes are being
cut, but rather the string representation of the number. Mostly this is not a concern as application logic is used with data from a database, which works with the actual data (in this case the number itself) and not its string representation. But if you absolutely require this, you can format the string within the query:This should do the trick, but again remember, it is a pretty pointless exercise. For additional details: http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#SQLRF00211