Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by
Message
De
16/03/2008 01:37:31
 
 
À
16/03/2008 01:05:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01302445
Message ID:
01302459
Vues:
7
Trust me, maybe you don't think so now, but down the road you should see benefits from accepting this. As you won't have to think about which tool you're writing the SQL in.

>>VFP syntax was finally changed in VFP8 to be more SQL standard compliant. In particular this affected the SQL "Group By" clause.
>>
>>In simple terms every column in your column list when using a Group By must fall into one of 2 categories:
>>
>>- the column must be part of an agregate, SUM, MAX, MIN, etc.
>>- the column must be part of the "Group By..." column list.
>>
>>To be SQL standard compliant, you must write your SQL Selects in this fashion.
>>
>>
>>>In the old days (VFP 7) I did the occasional GROUP BY and things went well. It was ... well it seemed intuitive.
>>>
>>>With VFP 9, the rules have changed, and no matter how many time I read what I can find in the help files, everything seems inside out now. I seem to end up with a GROUP BY clause that needs about 15 fields listed (none of which I want to group by).
>>>
>>>Can someone point me to an article of some sort that will fix this mental block that I have on the philosophy of GROUP BY? I'm getting really tired of "SQL: GROUP BY clause is missing or invalid".
>>>
>>>Bob
>
>Thanks to all.
>I think it was just the long list in the GROUP BY that was getting me down. I'll get over it.
>
>Bob

(On an infant's shirt): Already smarter than Bush
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform