Rounding of different denominations (10,25,50,100)

In this forum you can share stuff related to Oracle 11g, 10g, 9i.
Post Reply
sikandar
Posts: 32
Joined: Fri Mar 31, 2006 4:13 pm
Location: Pakistan
Contact:

Rounding of different denominations (10,25,50,100)

Post by sikandar »

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
omerjaved100
Posts: 25
Joined: Fri Mar 31, 2006 4:49 pm
Location: United Kingdom

Post by omerjaved100 »

Nice................. [:)]

Regards,
M.Omer Javed
ERP Technical Consultant
Mob:+923214647529/ +923004479693
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests