Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 8.0 - Select - SQL
Message
De
18/07/2003 10:13:51
 
 
À
18/07/2003 10:03:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00811460
Message ID:
00811484
Vues:
13
>>Have you tried? I get an error message.
>
>VFP8 doesn't allow a 'group by' clause that does not include all of the fields in the select. The only way to make it work that way is to Set EngineBehavior 70 to make it revert to the way VFP7 worked.
>
>About the only other thing you can do is to make any of the fields that are not to be included in the group by into aggregate fields.
>
>Alan

Alan --

And, since VFP 8 now conforms to the SQL standard, it's probably a good idea to follow your second strategy...

The aggregate expression MAX() around a non-grouped character field may seem a bit unusual, but it works just fine.

It's a good reminder that, in almost all cases, the fields "in limbo" -- without an aggregate function or included in the group by expression -- are "implementation dependent" -- and therefore, meaningless.

Jay
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform