Hi APA,
I'm not sure whether you've chosen to modify your query or to use SET
ENGINEBEHAVIOR 70 to allow your query to run as-is. But for others reading
here....
While we are often familiar enough with our data to know that all the fields
except one will have the same value, we really can't be sure. Setting
ENGINEBEHAVIOR to 70 will allow the query to run, but the query is faulty
and the values in all those other fields are meaningless. VFP generally uses
the last value it sees but there may be other values in the data.
It's really best to list every field in the Select clause, except
aggregates, in the Group By clause.
--
Cindy Winegarden
cindy@
cindywinegarden.com
VFP OLE DB:
http://msdn2.microsoft.com/en-us/vfoxpro/bb190232.aspx
VFP ODBC:
http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx
"apa"
wrote in message
news:8VyMh.49848$DN.47265@pd7urf2no...
>> This thing works fine in VFP 7 when i try to execute it, but in version 9
>> it gives me an error GROUP By clause missing or invalid. Anything im
>> missing here?
>>
>> SELECT MIN(workdate) as DStart, MAX(workdate) as Dend, military1 as
>> tStart, military2 as tEnd,orno as Croom, ;
>> cweeks as cWeeks, cDays as Cdays, laway as laway, cawaydsc as
>> cdsc,CRANGGRPID as rangegroupid ;
>> FROM staffdtl ;
>> WHERE staffid = "XXX" ;
>> GROUP BY CRANGGRPID ;
>> ORDER BY dDateStart, dDateEnd, itimeStart, itimeEnd ;
>> INTO CURSOR cTest