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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
ASKER
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.....