| From: | Josh Berkus <josh(at)agliodbs(dot)com> |
|---|---|
| To: | Joseph Healy <j(dot)healy(at)ugrad(dot)unimelb(dot)edu(dot)au>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Group By Error Text |
| Date: | 2003-01-19 22:46:39 |
| Message-ID: | 200301191446.39772.josh@agliodbs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Joe,
> ERROR: Attribute drawing_register.jobno must be GROUPed or used in an
> aggregate function
>
> Is this correct? Getting rid of the error is easy:
>
> select jobno, count(jobno) from drawing_register group by jobno;
>
> I believe that jobno is being used in an aggregate function. Should a
> change be made to the error text?
Nope. The error message is exactly correct. If you didn't want to GROUP BY
jobno, then what you actually wanted to query was:
SELECT count(jobno) FROM drawing_register;
--
-Josh Berkus
Aglio Database Solutions
San Francisco
| From | Date | Subject | |
|---|---|---|---|
| Next Message | D'Arcy J.M. Cain | 2003-01-20 01:34:25 | Re: Selecting a non-locked row. |
| Previous Message | Joseph Healy | 2003-01-19 22:36:41 | Group By Error Text |