Re: [GENERAL] Group by problem!

2009-11-04 Thread Sam Mason
On Wed, Nov 04, 2009 at 12:41:25PM +0330, shahrzad khorrami wrote: > Column | Type | > id | integer | not null default > f1 | character varying(32) | > f3 | character varying(32) | > f4 | character varying(32) | > f5 | character varying(32) |

Re: [GENERAL] Group by problem!

2009-11-04 Thread Grzegorz Jaƛkiewicz
On Wed, Nov 4, 2009 at 9:11 AM, shahrzad khorrami < shahrzad.khorr...@gmail.com> wrote: > > hi all, > > > > > Column | Type | > Modifiers > > +---+--- > id | integer | not null default >

[GENERAL] Group by problem!

2009-11-04 Thread shahrzad khorrami
hi all, Column | Type | Modifiers +---+--- id | integer | not null default nextval('test_id_seq'::regclass) f1 | character varying(32) | f3 | character varying(32) | f4

Re: [GENERAL] group by problem

2000-06-15 Thread Vashenko Maxim
Matthias Teege wrote: > > Moin, > > i have an sql query which works perfect under PostgrSQL > 6.0 but under 6.5.1 it brings: ERROR: Illegal use of > aggregates or non-group column in target list. > > select T1.id, T1.name, T1.zusatz, T1.kontakt, T1.strasse, > T1.land, T1.plz, T1.ort, T1.telefax

[GENERAL] group by problem

2000-06-15 Thread Matthias Teege
Moin, i have an sql query which works perfect under PostgrSQL 6.0 but under 6.5.1 it brings: ERROR: Illegal use of aggregates or non-group column in target list. select T1.id, T1.name, T1.zusatz, T1.kontakt, T1.strasse, T1.land, T1.plz, T1.ort, T1.telefax from debitoren T1, auftrag T2 where T2.

Re: [GENERAL] "group, by", problem, when, combined, with, "insert, into"

1999-08-05 Thread Ross J. Reedstrom
On Thu, Aug 05, 1999 at 01:19:10PM -0400, Brett W. McCoy wrote: > On Wed, 4 Aug 1999, sam smith wrote: > > > 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

Re: [GENERAL] "group, by", problem, when, combined, with, "insert, into"

1999-08-05 Thread Mike Mascari
I believe previous versions actually allowed you to (if memory serves), but the developers currently disabled this statement because it could sometimes cause incorrect results. At: http://www.postgresql.org/docs/todo.html you'll find several references to this problem: * -INSERT ... SELECT

Re: [GENERAL] "group, by", problem, when, combined, with, "insert, into"

1999-08-05 Thread Brett W. McCoy
On Wed, 4 Aug 1999, sam smith wrote: > 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 I think

[GENERAL] "group, by", problem, when, combined, with, "insert, into"

1999-08-04 Thread sam smith
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 E