Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By Example in VFP 8
Message
From
22/07/2004 16:36:29
Luis Navas
Independent Consultant
Auckland, New Zealand
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00926827
Message ID:
00927177
Views:
18
>>Thanks Craig, but in this way SELECT returnm me the same number of records as without the Group By Clause, before with Set Enginebehavior 70 and only writing codpai in the Group By it gives me 19, and writing what you told me it gives me 1410 Records.
>>Thanks for your time
>>Luis Navas
>>>The GROUP BY must include all the fields in the SELECT that are not aggregate fields (SUM, AVG, etc).
>>>
>>>GROUP BY Codpai, Codven, Valpedmn, Fecped, Nompai, Nomven
>>>
>
>That's because the values of Codven, Valpedmn, Fecped, Nompai and Nomven are not all the same for each value of Codpai. With the old way, you had no guarantee of what values would be in these other fields. The old way also was not ANSI SQL compliant.


Thanks, but what if want to group on Codven and I donsen't care if the other values are the same?
Luis
I never forget a face, but in your case I will make an exception :-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform