Author Topic: Using SQL to update Inventory "sell price" to nearest $.50/$1 increment  (Read 546 times)

roscom

  • Full Member
  • ***
  • Posts: 34
    • Awana@Gold Country Baptist Church
There is a very old reply on how to do this (see below).  I am wondering if this will still work for the latest version of AWdb? 

Quote
The following SQL will round the Sell_Price up to the next even $0.50 or $1.00 increment.  For example, an item with a Sell_Price of $0.34 becomes $0.50   and an item with a Sell_Price of $21.99 becomes $22.00 

Again, please run the Backup Utility BEFORE you run any SQL statements that modify data.

                     Update Inventory set Sell_Price = ROUND((Sell_Price)/ .5,0)* .5


(This works with all versions through at least 5.0.0.3)

4/12/19 - this still works! akj
« Last Edit: April 12, 2019, 09:44:11 AM by Annette »
Maureen Roscorla
Administrator
Awana@Gold Country Baptist Church