AB Vyas
AB Vyas

Reputation: 2389

Round the third decimal place up into the second decimal place (e.g. $0.033 becomes $0.04)

When we increased the price with 10%, some products (the ones that have 3 decimal points), got an unwanted price change. For example, an item that had a price of 0.03 changed to 0.033.

Our client doesn't want a three decimal point in the pricing.

We want to round the third decimal place up into the second decimal place (e.g. $0.033 becomes $0.04).

If my value is 0.033, I want result to be 0.04.

Please help me

Regards

Amit Vyas

Upvotes: 2

Views: 594

Answers (2)

Er Paras Patel
Er Paras Patel

Reputation: 31

Please used this

ROUND ( 0.335 , 2 )

This will work in my database

Regards Paras

Upvotes: 0

Andrew
Andrew

Reputation: 27294

An alternative way to do it would be CEILING(n * 100) / 100

Upvotes: 4

Related Questions