Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New SQL: What's with the GROUP BY error?
Message
From
25/11/2003 12:48:35
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00853362
Message ID:
00853390
Views:
17
to reiterate: As you said, VFP8 follows standard SQL, so all non-aggregate columns in the select list must be in the group by list, and they are not, hence the error.
in this example's group by clause, you would need to list all the columns in Detail by name, and Codes.desc

>
>SELECT Detail.*, count(*) as Total, Codes.desc;
> FROM ;
>     detail ;
>    LEFT OUTER JOIN codes ;
>   ON  Detail.bccode = Codes.code;
> GROUP BY Detail.bccode; <-- need all non-aggregate columns in the select list here
> ORDER BY Detail.bccode
>
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform