Rounding of different denominations (10,25,50,100)
Posted: Mon Apr 24, 2006 9:26 am
Some time you may have to round to 10,25,50,100 etc so here are few example hope would serve the purpose.
SQL> select round(nvl(173,0)/10,0)*10 from dual;
ROUND(NVL(173,0)/10,0)*10
-------------------------
170
SQL> select round(nvl(173,0)/25,0)*25 from dual;
ROUND(NVL(173,0)/25,0)*25
-------------------------
175
SQL> select round(nvl(173,0)/50,0)*50 from dual;
ROUND(NVL(173,0)/50,0)*50
-------------------------
150
SQL> select round(nvl(173,0)/100,0)*100 from dual;
ROUND(NVL(173,0)/100,0)*100
---------------------------
200
SQL> select round(nvl(173,0)/10,0)*10 from dual;
ROUND(NVL(173,0)/10,0)*10
-------------------------
170
SQL> select round(nvl(173,0)/25,0)*25 from dual;
ROUND(NVL(173,0)/25,0)*25
-------------------------
175
SQL> select round(nvl(173,0)/50,0)*50 from dual;
ROUND(NVL(173,0)/50,0)*50
-------------------------
150
SQL> select round(nvl(173,0)/100,0)*100 from dual;
ROUND(NVL(173,0)/100,0)*100
---------------------------
200