We help IT Professionals succeed at work.

# Price rounding (store prices) !!!

on
362 Views
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.

Comment
Watch Question

## View Solution Only

Commented:
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
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)

Commented:
Forced accept.

Computer101
Unlock the solution to this question.