Hi,
just simple suggestion - what about dividing number by 25 (which is step for your ROUND), rounding the decimal to nearest integer (standard ROUND function should by sufficient) and then multiplying integer back with 25 - the solution on level of two years programming experience at high school :D

hope I was of some help

btw. although oracle has ROUND with second paramter - as a grade of ROUND, it works only for integer grades of 10 to round:

SELECT  ROUND(113.34,-1.5) c1
      , ROUND(113.34,-LOG(10, 25)) c2
      , ROUND(113.34,-1.5) c2
      , ROUND(113.34,-2) c2
FROM    DUAL
;

C1                     C2                     C2                     C2
---------------------- ---------------------- ---------------------- ----------------------
110                    110                    110                    100

I found this interesting news :)

best regards
    hoppo

On 10. 2. 2012 18:13, swaroop gowda wrote:
Hi All,
I have total amount like 110.01, 113.34, 126.01, 145.54, 155.01 etc but I need to round this 100 or 125 or 150 etc.

Please find my requirement below,
1) I need to round to 100 if the total is between 100 to 112.
2) I need to round to 125 if the total is between 113 to 125.
3) I need to round to 125 if the total is between 116 to 137.
4) I need to round to 150 if the total is between 138 to 150.
5) I need to round to 150 if the total is between 151 to 167.
5) I need to round to 200 if the total is between 168 to 200.

You help is greatly appreciated.
--
Thanks & Regards
Swaroop Thailuru Swamy
Ph: 713-392-1571

--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to