Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Paul D'Anna
  Where is Paul D'Anna?
 Metairie
 Louisiana - United States
 Paul D'Anna
 Tags
Subject: RE: Select Statement
Thread ID: 112565 Message ID: 112570 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Visual Basic
Date: Thursday, November 09, 2006 6:56:12 PM         
   


> I am getting an "INVALID or MISSING GROUP" statement when I try to run this "Select" command. The program and data were running under VFOX 7. I upgraded to Vfox 9, and started experiencing problems with "GROUP", not only in this "Select" command, but in others as well.
>
> Any suggestions?
>
> Thanks in advance,
> Paul D'Anna
>
> > > > > > > > > > > > >

Check SET ENGINEBEHAVIOUR topic in HELP. VFP 8 and 9 are made more ANSI compatible so you must add all fields which are not involved in agregate functions in GROUP BY clause, In VFP9 your queru must look like this:
SELECT Qb.lawyer,;
SUM(Qb.jan1) AS "JAN1" , SUM(Qb.feb1) AS "FEB1", SUM(Qb.mar1) AS "MAR1",;
SUM(Qb.apr1) AS "APR1" , SUM(Qb.may1) AS "MAY1", SUM(Qb.jun1) AS "JUN1",;
SUM(Qb.jul1) AS "JUL1" , SUM(Qb.aug1) AS "AUG1", SUM(Qb.sep1) AS "SEP1",;
SUM(Qb.oct1) AS "OCT1" , SUM(Qb.nov1) AS "NOV1", SUM(Qb.dec1) AS "DEC1",;
SUM(Qb.jan2) AS "JAN2" , SUM(Qb.feb2) AS "FEB2", SUM(Qb.mar2) AS "MAR2",;
SUM(Qb.apr2) AS "APR2" , SUM(Qb.may2) AS "MAY2", SUM(Qb.jun2) AS "JUN2",;
SUM(Qb.jul2) AS "JUL2" , SUM(Qb.aug2) AS "AUG2", SUM(Qb.sep2) AS "SEP2",;
SUM(Qb.oct2) AS "OCT2" , SUM(Qb.nov2) AS "NOV2", SUM(Qb.dec2) AS "DEC2",;
Qb.xlname,Qb.xlphone;
FROM Qb;
ORDER BY Qb.lawyer;
GROUP BY Qb.lawyer,Qb.xlname,Qb.xlphone;
INTO CURSOR Qb




Borislav Borissov



ENTIRE THREAD

Select Statement Posted by Paul D'Anna @ 11/9/2006 6:41:37 PM
RE: Select Statement Posted by Eric den Doop @ 11/9/2006 6:54:58 PM
RE: Select Statement Posted by Borislav Borissov @ 11/9/2006 6:56:12 PM
RE: Select Statement Posted by Paul D'Anna @ 11/9/2006 7:23:40 PM
RE: Select Statement Posted by Borislav Borissov @ 11/9/2006 7:41:22 PM
RE: Select Statement Posted by Ken Murphy @ 11/9/2006 9:15:25 PM