Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I can't group by!!!
Message
 
 
À
07/07/2009 08:24:07
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01409847
Message ID:
01410519
Vues:
55
>>>>Thank you, Chuck and Sergey.
>>>>
>>>>i really couldn't understand why Microsoft changed the "group by" syntax and I don't understand how I can do to fix my instruction but your explanation was good for me.
>>>>
>>>>Thank you again.
>>>>
>>>> Héctor
>>>
>>>MS changed the syntax to make it more ANSI standard. Other languages don't allow to use non-aggregate fields in Select-SQL without GROUP BY.
>>
>>Yes. And if you think about it, the old VFP way is conceptually impure. If a column is not an aggregate function or one of the GROUP BY terms, you are going to get the value from an arbitrary row.
>
>Not in any case. For example if you have a 1 to n and sum all n's and display fields from the 1's then the PK is the only thing you realy need. The rest will be from the 1 record anyway. So it's a lot of superflous work to check each non aggregate for changes. I found it to much work to redesign all the views etc and stuck with the old behaviour.

I wasn't thinking of joins, just a basic single table query with a GROUP BY.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform