View Full Version : Query Circular Error?


PJLD97
05-29-2007, 07:51 AM
Noob! I am building an inventory db. I need a query(s) that uses a Qty available to add inventory added, subtract inventory used and put the final total back into Qty Available. I'd prefer to do in all in one query if possible. Any suggestions?

RuralGuy
05-29-2007, 07:55 AM
Maybe this link (http://allenbrowne.com/AppInventory.html) will shed some light on the subject.

PJLD97
05-29-2007, 08:12 AM
Thank you for your prompt reply. I guess I didn't say that the New updated quantity has to be become a part of a db-not virtual -per boss's request.

RuralGuy
05-29-2007, 08:49 AM
There is a good reason Allen calculates the Quantity on Hand rather than keep the value in a table somewhere. He has been doing db's for many years and is an expert in the field. I suspect you are employed as the resident db expert and should be able to offer advice on the topic as part of your job. Of course, that is just my opinion. :D

PJLD97
05-29-2007, 09:59 AM
Thank you for the compliment of "resident db expert" ...it sounds great but not sure that all agree! Will keep trying, though. Thanks again.

RuralGuy
05-29-2007, 11:28 AM
Does you "Boss" have a specific reason to have the Quantity on Hand stored in a field or was it just a thought on how to do it?

PJLD97
05-29-2007, 11:43 AM
I think it may have been a thought on how to do it. He has programmed long ago but VB and the Access version of sql are fairly new to him. I reread the article you refered to and I am going to give it a go. It may be a good solution to show him. I'm also going to find more info on Allen Browne and his info. He does sound good. Thanks very much for the "new direction!"

RuralGuy
05-29-2007, 12:09 PM
You are probably aware of the "Rule of Thumb" of not storing calculated values and the reasons behind it. This is the same issue. I reference Allen's site often because of his well thought out solutions to many issues.