Try:
SELECT Inv.Location, Count(OnHand.PK);
FROM Inv;
LEFT OUTER JOIN OnHand ON Inv.PK = OnHand.FK;
GROUP BY Inv.Location
HTH
>I'm not certain as to how to obtain the results I want from a SELECT-SQL statement...
>
>For inventoy there are 2 tables, a master holding all inventory items, and an on-hand, holding only parts that are available in the stockroom or factory. When I select I do an inner join on the part number where the location matches one specified...like 01 for stock, 02 for factory. The onhand table holds only what's in stock, so if there's some in 02, but not 01, then 02 is the only record in the onhand table...that works fine, but for my SQL results I want to show 0 on hand in location 01 when they do a WHERE location=01. What's the best way to do this?
>
>Also, when finding onhand for all locations, I want to show the sum of all locations for that part. Again, what's the best way to proceed?
>
>Should I be using several SELECT statements? Or should I try using a filter? Thanks for any help you might be able to provide, since I'm really quite a greenhorn with SQL;)