-
decrement value
Hello, I have a product table with quantity for each product. I want to decrease the quantity according to the transaction. What is the simplest way to do that ?
-
You'd need a separate table to capture the transactions. Then you could set up a couple queries, one select query to identify the most recent transaction (that hasn't been decrecemented yet) for each product, and an update query to execute the actual reduction in your inventory table.
Feel free to email a zip version of the database to info@superaccessninjas.com for more specifics on the solution.
-
to not do this at all, just sum the transactions. With a very few exceptions you should not store calculated values in a database - this is not one of those exceptions. With stock there will be a variety of transactions - stock in, stock out, stock adjustment, perhaps an opening balance if the stock pre exists the database
-
Thank you guys for the reply. Superaccessninjas i sent the db
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules