Information générale
Catégorie:
Codage, syntaxe et commandes
>>>>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
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