Re: [GENERAL] field must appear in the GROUP BY clause or be used

2004-02-27 Thread Richard Huxton
On Friday 27 February 2004 16:39, Bill Moran wrote: > John Sidney-Woollett wrote: > > Bill Moran said: > >> > >>SELECT GCP.id, > >>GCP.Name > >> FROMGov_Capital_Project GCP, > >> WHERE TLM.TLI_ID = $2 > >> group by GCP.id > >> ORDER BY gcp.name; > >>ERROR: column "gcp

Re: [GENERAL] field must appear in the GROUP BY clause or be used

2004-02-27 Thread scott.marlowe
On Fri, 27 Feb 2004, Bill Moran wrote: > Hey all. > > I've hit an SQL problem that I'm a bit mystified by. I have two different > questions regarding this problem: why? and how do I work around it? > > The following query: > > SELECTGCP.id, > GCP.Name > FROMGov_Capital_

Re: [GENERAL] field must appear in the GROUP BY clause or be used

2004-02-27 Thread Mike Mascari
Bill Moran wrote: Hey all. I've hit an SQL problem that I'm a bit mystified by. I have two different questions regarding this problem: why? and how do I work around it? The following query: SELECT GCP.id, GCP.Name FROMGov_Capital_Project GCP, WHERE TLM.TLI_ID = $2 group

Re: [GENERAL] field must appear in the GROUP BY clause or be used

2004-02-27 Thread Bill Moran
John Sidney-Woollett wrote: Bill Moran said: I've hit an SQL problem that I'm a bit mystified by. I have two different questions regarding this problem: why? and how do I work around it? The following query: SELECT GCP.id, GCP.Name FROMGov_Capital_Project GCP, WHERE TLM.TLI

Re: [GENERAL] field must appear in the GROUP BY clause or be used

2004-02-27 Thread John Sidney-Woollett
Bill Moran said: > I've hit an SQL problem that I'm a bit mystified by. I have two different > questions regarding this problem: why? and how do I work around it? > > The following query: > > SELECTGCP.id, > GCP.Name > FROMGov_Capital_Project GCP, > WHERE TLM.TLI_ID =