Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GROUP BY 1 no longer works
Message
 
 
À
19/02/2003 22:40:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00750415
Message ID:
00755329
Vues:
34
Dragan,

>Frankly, I'd accept first or last, if only it was sure to behave the same each time.
>
>This was always a gray area, but then for the cases where you wanted one of the values for that field (and didn't really care which), this was a nice loophole.


If you don't care what values are in those fields, you can wrap them into MIN() or MAX() function to make query valid.

>Of course, having an aggregate function ValueOfAWhenMaxB(fieldA, FieldB), which would return the value of FieldA from the record where FieldB=max(FieldB) would be even better. That would help in all the cases when we need to know the date when temperature was lowest, or the customer who bought most of a certain item... but then, we can always roll our own for such cases.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform