Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GROUP BY clause difference between VFP & MSSQL
Message
De
14/09/2000 19:38:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00416688
Message ID:
00416696
Vues:
23
When you stop to think about what the group by clause does, we really shouldn't be able to "leave out" fields in the aggregation. It's a "quirk" of foxpro that I have exploited often when I know what I am losing. But it is dangerous for folks that don't know what might be missing in their result set.


>This should be easy for seasoned c/s pros but I have problem getting around it. In MSSQL, columns that appear in the select list "must be" used as arguments of an aggregate function in the GROUP BY clause. For example, in VFP you could do this:
>
>SELECT table1.*, table2.field1, table2.field2, table2.field3
> FROM table1 JOIN table2 ON table1.fieldx=table2.fieldx
> GROUP BY table2.field2
>
>But you can't do this with MSSQL. How do I get around this "feature"?
Timothy D. Yeaney
MCSD, Charter Member
President, PAFOX (Potomac Area Fox User Group)
mailto:tim@eagleeyeinc.com
Vice President
Eagle Eye Publishers, Inc
Broaden Your Vision, Sharpen Your Focus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform