Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grouping Right
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00210317
Message ID:
00210625
Vues:
34
I'm pleased that you found a solution to your problem but it doesn't make sense to me.
Even though the GROUP BY clause is usually used with an aggregation function (in this case MAX(date)), in my experience the following two SELECTs return the same result set.

SELECT fld1 from sometabl group by 1

SELECT fld1 distinct from sometabl

and if applied to your data set would return both items (with and without the R)


>I have found the answer thanks to all of you. I needed to use the group by but not order by as long as I used the max(date). This gave me all the records and the latest prices.
>
>Thanks!
>
>>>>If you remove the GROUP BY, does the missing item show up?
>>>
>>>Yes, The item does show up (seven times).
>>
>>Then it must be the GROUP BY that's the culprit...
>>
>>Did you say somewhere else that "Select Distinct Item..." instead of GROUP BY didn't work also, or have you tried that?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform