Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summing by location
Message
 
 
To
26/07/1999 12:59:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00246115
Message ID:
00246193
Views:
16
>Try:
>
SELECT Inv.Location, Count(OnHand.PK);
>   FROM Inv;
>   LEFT OUTER JOIN OnHand ON Inv.PK = OnHand.FK;
>   GROUP BY Inv.Location
HTH
>

Actually, that did help, I didn't realize how grouping worked before...I used SUM() instead of COUNT() to get the total on hand...Thanks Sylvain!!

But now, if I search on a part in location 01 and it's there's no stock in location 01, in which case there wouldn't be an entry in the onhand table, how do I get it to select that part number and instead say that onhand=0?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform