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

Поиск
Список
Период
Сортировка
От sam smith
Тема "group, by", problem, when, combined, with, "insert, into"
Дата
Msg-id 19990805053521.67875.qmail@hotmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] "group, by", problem, when, combined, with, "insert, into"  ("Brett W. McCoy" <bmccoy@lan2wan.com>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Simms
Дата:
Сообщение: PQsendQuery
Следующее
От: DE VOLDER Fabrice
Дата:
Сообщение: unsuscribe