MikeMCSD
asked on
Update and data manipulation of a number field
I have a "Price" field that contains values like : 50.22, 8.78, 68.19, etc.
I want the last 2 digits after the decimal point to be rounded like this :
If : .01 to .29 = .29
If : .30 to .49 = .49
If : .50 to .99 = .95
So if Price is "29.14", it would be "29.29", . . . "18.78" would be "18.99", etc.
UPDATE Nop_ProductVariant
SET Price = ?
Also, I want to raise all Prices by 18%, like :
UPDATE Nop_ProductVariant
SET Price = round(Price * 1.18, 2)
Can I combine these 2 queries at once? Or should I run 2 separate queries? Thanks
I want the last 2 digits after the decimal point to be rounded like this :
If : .01 to .29 = .29
If : .30 to .49 = .49
If : .50 to .99 = .95
So if Price is "29.14", it would be "29.29", . . . "18.78" would be "18.99", etc.
UPDATE Nop_ProductVariant
SET Price = ?
Also, I want to raise all Prices by 18%, like :
UPDATE Nop_ProductVariant
SET Price = round(Price * 1.18, 2)
Can I combine these 2 queries at once? Or should I run 2 separate queries? Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks all
Open in new window