"group, by", problem, when, combined, with, "insert, into"

From: "sam smith" <sam_smith20(at)hotmail(dot)com>
To: pgsql-general(at)hub(dot)org
Subject: "group, by", problem, when, combined, with, "insert, into"
Date: 1999-08-04 21:35:19
Message-ID: 19990805053521.67875.qmail@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All

I'm pretty new to postgres and I'm finding soemthing baffling. I can
perform the following query without a problem -

select loser,count(*) from moves group by loser;

but when i combine it with an insert into -
insert into losses select loser,count(*) from moves group by loser;

I get
ERROR: Illegal use of aggregates or non-group column in target list

Am I doing something wrong or is it not possible to combine insert into and
group by.

I'm using PostgreSQL 6.5.0

Cheers
Sam

_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 1999-08-04 22:14:41 Re: [GENERAL] ElephantWear Now Available...
Previous Message Thomas Good 1999-08-04 20:45:38 Re: [GENERAL] ElephantWear Now Available...