We help IT Professionals succeed at work.

Price rounding (store prices) !!!

zeeshanbutt
zeeshanbutt asked
on
362 Views
Last Modified: 2012-06-21
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.
Comment
Watch Question

Author

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
Please help.
Thanks in advance.....
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Forced accept.

Computer101
EE Admin
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.