quantity Problems

mis

Registered User.
Local time
Today, 12:55
Joined
Dec 15, 2003
Messages
55
Hi,

I have got a product table that has a quantity field, this fields holds the number of items for each individual product. Product Sales also have a quantity for each product sold, I would like the database to take the quantity from the product sales table and deduct this value from the quantity for the that product from the products table.

Any ideas.
 
This is a regular. Basically, it's bad practice to hold a quantity in a table like this. The better approach is to hold all the transaction that affect the balance held, and calculate the balance any time you need it. Do a search on stock control or inventory in this forum for more details.

If you are absolutely insistent on doing it the wrong way, you need an update query and subtract the quantity sold from the balance.
 

Users who are viewing this thread

Back
Top Bottom