Re: GROUP BY Clause Problem in VFP8
From: Fred Taylor (ftaylor_at_mvps.org!REMOVE)
Date: 10/16/04
- Next message: Anders Altberg: "Re: SQL query to open OLEDB or ODBC to VFP?"
- Previous message: Steve Meyerson: "GROUP BY Clause Problem in VFP8"
- In reply to: Steve Meyerson: "GROUP BY Clause Problem in VFP8"
- Next in thread: Steve Meyerson: "Re: GROUP BY Clause Problem in VFP8"
- Reply: Steve Meyerson: "Re: GROUP BY Clause Problem in VFP8"
- Reply: Steve Meyerson: "Re: GROUP BY Clause Problem in VFP8"
- Messages sorted by: [ date ] [ thread ]
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
ambiquous.
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
VFP.
-- Fred Microsoft Visual FoxPro MVP "Steve Meyerson" <stevemeyerson@cox.net> wrote in message news:i453n0l3j9q98mi10mb18iggr4qbe5tj8m@4ax.com... > 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 > >
- Next message: Anders Altberg: "Re: SQL query to open OLEDB or ODBC to VFP?"
- Previous message: Steve Meyerson: "GROUP BY Clause Problem in VFP8"
- In reply to: Steve Meyerson: "GROUP BY Clause Problem in VFP8"
- Next in thread: Steve Meyerson: "Re: GROUP BY Clause Problem in VFP8"
- Reply: Steve Meyerson: "Re: GROUP BY Clause Problem in VFP8"
- Reply: Steve Meyerson: "Re: GROUP BY Clause Problem in VFP8"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|