Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

2012-01-31 Thread Edward W. Rouse
dler Sent: Tuesday, January 31, 2012 3:57 PM To: Edward W. Rouse Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem On Tue, Jan 31, 2012 at 12:27 PM, Edward W. Rouse wrote: And in most cases this works fine. The problem ari

Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

2012-01-31 Thread Samuel Gendler
> > ** ** > > *From:* pgsql-sql-ow...@postgresql.org [mailto: > pgsql-sql-ow...@postgresql.org] *On Behalf Of *Samuel Gendler > *Sent:* Tuesday, January 31, 2012 3:57 PM > *To:* Edward W. Rouse > *Cc:* pgsql-sql@postgresql.org > *Subject:* Re: [SQL] must appear in t

Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

2012-01-31 Thread Edward W. Rouse
lf Of Edward W. Rouse Sent: Tuesday, January 31, 2012 4:27 PM To: 'Samuel Gendler' Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem I would love to remove most of the aggregate functions. I am trying to update an

Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

2012-01-31 Thread Edward W. Rouse
se Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem On Tue, Jan 31, 2012 at 12:27 PM, Edward W. Rouse wrote: And in most cases this works fine. The problem arises when invoices get added to the exception table due to

Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

2012-01-31 Thread Samuel Gendler
On Tue, Jan 31, 2012 at 12:27 PM, Edward W. Rouse wrote: > And in most cases this works fine. The problem arises when invoices get > added to the exception table due to their not being an invoice number. Even > though we join on the tracking id, the group by on invoicenum lumps the > different bla

Re: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

2012-01-31 Thread David Johnston
-Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Edward W. Rouse Sent: Tuesday, January 31, 2012 3:27 PM To: pgsql-sql@postgresql.org Subject: [SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

[SQL] must appear in the GROUP BY clause or be used in an aggregate function problem

2012-01-31 Thread Edward W. Rouse
Attempting to get a list of items that we want to be grouped by id and date, with a detail column. Table a is a typical user table; id, first and last name are all that I am using Table b is a tracking table, combining data from 8+ tables into one for ease of use for reporting purposes; id, useri