Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 Tags
Subject: RE: enginbehaviour
Thread ID: 288699 Message ID: 288953 # Views: 27 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Projects and Design
Date: Monday, December 27, 2010 10:19:44 AM         
   


> >
> >
> > select xtemp.ecode,month(xtemp.xdate) as colhead,;
> > xtemp.wages;
> > from xtemp;
> > group by xtemp.ecode,xtemp.xdate;
> > order by xtemp.ecode,xtemp.xdate;
> > into cursor sys(2015)
> > do sys(2004)+'master\prgs\genxtab' with 'xtab'
> > I have same problem, i used SET ENGINEBEHAVIOR 90, but mothing.
> > and not accept genxtab.prg file
> >
> >
> > Be Possitive
>
> You shouldn't use GROUP BY when there's no aggregation with any of the functions SUM(), COUNT(), AVG(), MIN() or MAX()



Why must we use aggregation? Can you explain?
select religion,city from employees order by religion,city group by religion,city

Would I have to use a aggregate function for the query above? Even if I don't need it?
(Note: above is just a query from top of my head, as a example)




> If there's only one possible wages for a given ecode+month you can use MAX(wages) or MIN(wages), SUM(wages), or AVG(wages(: they will all come to the same.
> -Anders



Regards
Samir

ENTIRE THREAD

enginbehaviour Posted by vaishali maske @ 12/23/2010 10:09:04 AM
RE: enginbehaviour Posted by Cetin Basoz @ 12/23/2010 10:17:23 AM
RE: enginbehaviour Posted by vaishali maske @ 12/23/2010 10:59:06 AM
RE: enginbehaviour Posted by Anders Altberg @ 12/23/2010 2:56:09 PM
RE: enginbehaviour Posted by Rakesh Kumar @ 12/23/2010 3:39:27 PM
RE: enginbehaviour Posted by Anders Altberg @ 12/24/2010 2:23:32 AM
RE: enginbehaviour Posted by Rakesh Kumar @ 12/25/2010 1:03:31 PM
RE: enginbehaviour Posted by Samir H. @ 12/27/2010 10:19:44 AM
RE: enginbehaviour Posted by Michel Levy @ 12/27/2010 11:34:50 AM
RE: enginbehaviour Posted by Samir H. @ 12/27/2010 12:05:40 PM
RE: enginbehaviour Posted by Michel Levy @ 12/27/2010 12:55:39 PM
RE: enginbehaviour Posted by Cetin Basoz @ 12/27/2010 11:37:58 AM
RE: enginbehaviour Posted by Anders Altberg @ 12/27/2010 12:22:00 PM
RE: enginbehaviour Posted by Anders Altberg @ 12/27/2010 12:24:24 PM
RE: enginbehaviour Posted by Samir H. @ 12/27/2010 1:08:41 PM