Hi,
I'm VERY new to building databases and am playing around with a few things before I unleash any "creations" upon the world.
My first test is to look at a Stock management DB.
I have 3 tables:
Stock (Type, Make, Model).
Stock In (Date In, Model, Quantity)
Stock Out (Date Out, Customer Ref, Model, Quantity)
Now - I fully appreciate I may have not separated the tables correctly - so feel free to feedback there...
However, my specific question is about running a query to show Total stock available. This should be Stock In - Stock Out. However, there are cases where stock out does not exist. With this, the query asks for values (rightly so) before it will run. I tried to build the expression with an Iif statement which looked something like:
Iif(QuantOut is Null, QuantIn, QuantIn - QuantOut). Unfortunately, that didn't do the trick.
Any ideas how you handle this type of error?
Thanks in advance.
I'm VERY new to building databases and am playing around with a few things before I unleash any "creations" upon the world.
My first test is to look at a Stock management DB.
I have 3 tables:
Stock (Type, Make, Model).
Stock In (Date In, Model, Quantity)
Stock Out (Date Out, Customer Ref, Model, Quantity)
Now - I fully appreciate I may have not separated the tables correctly - so feel free to feedback there...
However, my specific question is about running a query to show Total stock available. This should be Stock In - Stock Out. However, there are cases where stock out does not exist. With this, the query asks for values (rightly so) before it will run. I tried to build the expression with an Iif statement which looked something like:
Iif(QuantOut is Null, QuantIn, QuantIn - QuantOut). Unfortunately, that didn't do the trick.
Any ideas how you handle this type of error?
Thanks in advance.
Comment