Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL vfp 8 vs. vfp 6
Message
From
04/08/2003 19:39:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00815861
Message ID:
00816688
Views:
23
I guess it depends on how you define 'accurate'. You would get a record for each 'office' with the correct total price and total quantity for that office group. One item each from 'detail' and 'noun' would be tacked on for each group, but what they represent is really of no value because they would simply be one random item out of the group. In the case of fox, they would arbitrarily be the last item from the group.

Alan

>Would this be accurate if all I cared about was office?
>select detail,noun,sum(price),sum(qty),office from s:bsyear01 group by office;
>
>
>
>>Not so much incorrect data, as meaningless data. The fields not in the 'group by' clause are simply the information from the final record in the group. If that's what you wanted (for whatever reason), then the data was ok. If you thought you might be getting something else, then the data was misleading.
>>
>>Alan
>>
>>>That's kinda of discouraging(and confusing). I am supposed to think my sql select statements possibly returned incorrect data in vfp7?
>>>
>>>
>>>
>>>>It's documented in VFP8 help under Behavior Changes Since Visual FoxPro 7.0 and INFO: SQL SELECT Behavior Changes in Visual FoxPro 8.0 mskb #813361.
>>>>
>>>>>This statement works in vfp 6 but not vfp 8.
>>>>>Select detail,noun,sum(price),sum(quantity) from s:bsyear03 group by detail;
>>>>>into cursor norton
>>>>>
>>>>>In vfp8 the error message is "SQL:GROUP BY clause is missing or invalid."
>>>>>
>>>>>shall I change my ways?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform