Re: GROUP BY Clause Problem in VFP8

From: Fred Taylor (!REMOVE)
Date: 10/16/04

Date: Sat, 16 Oct 2004 16:22:58 -0700

VFP 8's SQL has been brought more into line with the the SQL standard. This
is correct operation of a SQL statement, though if you've gotten used to
VFP's earlier incorrect usage, it may not seem so.

So tell me, which ssn goes with which checkname in your select? It's

You can do SET ENGINEBEHAVIOR 70 to have it work in the old style, or you
can aggregate your ssn field with either a MIN or a MAX function. I do
believe that MAX(ssn) will give you the same results as previous versions of

Microsoft Visual FoxPro MVP
"Steve Meyerson" <> wrote in message
> The following worked fine in VFP6:
> SELECT CheckName, Ssn ;
>  FROM Payroll ;
>  INTO TABLE TempPay ;
>  GROUP BY CheckName
> In VFP8 I get the error msg:
> SQL: GROUP BY clause is missing or invalid
> even when I ran it from the command window.
> It will work ok  if I SELECT only one field instead of 2 or more, but
> that's not acceptable.
> Payroll is a free dbf.  I tried copying Payroll.dbf to "convert" it in
> case that was necessary. I also created a simple dbf in VFP8 and got
> the same behavior.
> Any clue what's going on? Thanks for any help.
> Steve Meyerson