Mike Yearwood
Toronto, Ontario, Canada
Hi Larry
I don't know if article is a PK or not. If it is, the code should work. If it isn't we need to change the code to use the PK.
I'll disregard your comments, just this once ;)
P.S. My name is spelled with an M ;)
ike
>Hey ike,
>If that's the case, then disregard my comments. From the structures used, it didn't appear that way. My take was that there were multiple entries for each "article". Possibly with different locations and or descriptions.
>
>>Hi Larry!
>>
>>Isn't aticles.article a PK?
>>
>>>Mike,
>>>Now we have something entirely different than the original. We have a table where article, description and location are different because they come from different rows in the articles table, but we have the same number in InStock for each row in the result set. Because the GROUP BY clause was not applied using the description and location, it only represents the total number of articles globally, not the number associated with the specified description and location.
>>>
>>>The result set would be valid but very misleading, IMO.
>>>
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement