Link to home
Start Free TrialLog in
Avatar of zeeshanbutt
zeeshanbutt

asked on

Price rounding (store prices) !!!

Hi All,

I have a following field in a table.
Price (decimal(18,2))

In my select I want to round this field & return it.
I want to round it in a way that we usually see prices in any grocery store.

For example usually we dont see price of $1.67, $11.98, $10.86, $3.09. Instead we usually see $1.75, $11.99, $10.99, $3.10 respectively.

I want the last 2 decimal placing of my roundings to something like this.

.00
.10
.20
.25
.30
.35
.40
.50
.60
.65
.75
.85
.99

etc

Is there a built in function to do that?
If yes, how.

Thanks for all your help.
Avatar of zeeshanbutt
zeeshanbutt

ASKER

So lets say the Price is x.05

X.05 should round to 0.10. Meaning after the rounding the Price either should remain same (if its already rounded) or it should increase to achieve the nearest rounding in the following list.

.00
.10
.20
.25
.30
.35
.40
.50
.60
.65
.75
.85
.99
Please help.
Thanks in advance.....
ASKER CERTIFIED SOLUTION
Avatar of twoboats
twoboats

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forced accept.

Computer101
EE Admin