Community Contributions > SQL Workbench

Using SQL to update Inventory "sell price" to nearest $.50/$1 increment

(1/1)

roscom:
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)
--- End quote ---

4/12/19 - this still works! akj

Navigation

[0] Message Index

Go to full version