0

I have 3 values saleprice, productprice and reward_price. I need to have it look for saleprice first and if there is no saleprice then look at productprice. Then grab it and round it up or down by 50 cents. Soo..

  • 4.49 = 4 reward_price = 4
  • 4.50 = 5 reward_price = 5

1 Answers1

0
SELECT
    Format(IIf(saleprice Is Null, productprice, saleprice), '#') AS reward_price
FROM YourTable;

Format() returns a string. If you need reward_price as an actual number, you can wrap the field expression inside a conversion function such as Val(), CCur(), CInt(), etc.

HansUp
  • 95,961
  • 11
  • 77
  • 135