Home » SQL & PL/SQL » SQL & PL/SQL » Re: VERY URGENT: HOW CAN I ROUND A NUMERIC VALUE UP TO THE HUNDREDS.
Re: VERY URGENT: HOW CAN I ROUND A NUMERIC VALUE UP TO THE HUNDREDS. [message #19790] Wed, 10 April 2002 04:11
Epe
Messages: 99
Registered: March 2002
Member
Hello,

if you use
"select round(number,-2) from table;", I think that 3211 will be rounded to 3200 (I'm sorry, but I have no Oracle connection at the moment to try it out).
I didn't find a function that rounds up to hundreds. But there is a function that rounds up to the first real number. So if you devide your number by 100, then use the round up function, and then multiply by 100, I think you should get what you want.

"select (ceil(number/100)*100 from table;"

Try it out, I hope it works (although it's just a workaround).

Success,

epe
Previous Topic: Re: To delete a file
Next Topic: dbms_output.put_line
Goto Forum:
  


Current Time: Sun May 05 03:26:23 CDT 2024