From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: joining 2 Tables. |
Date: | 2014-03-17 22:38:44 |
Message-ID: | 1395095924101-5796463.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Thomas Drebert wrote
> Hello,
>
> if i use the *, I get an error message.
>
> ERROR: column "n2.thecount" must appear in the GROUP BY clause or be used
> in an aggregate function
> ********** Fehler **********
>
> ERROR: column "n2.thecount" must appear in the GROUP BY clause or be used
> in an aggregate function
> SQL Status:42803
>
> regarts
> Thomas
>
>
>
> 2014-03-17 14:52 GMT+01:00 David Johnston <
> polobo@
> >:
>
>> Thomas Drebert wrote
>> > SELECT
>> > foo.updatezeit
>> > FROM
>>
>> You joined them ok. But this says you only want to see the
>> foo.updatezeit
>> in the final output. Try *
>>
>> David J.
>
>>
Sorry, "*" won't work because of the group/order at that level of the query.
You will need to devise a combination of select-list columns and group-by
columns that will give you the results you are looking for.
If you actually tell us what you want you will likely get better answers.
To be honest I'm not sure why you even have GROUP BY 1 in the query in the
first place. Remove that and the "*" will work.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/joining-2-Tables-tp5796290p5796463.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Rowan | 2014-03-22 23:47:35 | Postgres 9.1 trigger function parameters |
Previous Message | Thomas Drebert | 2014-03-17 22:27:29 | Re: joining 2 Tables. |