From: | Jeffrey Melloy <jmelloy(at)visualdistortion(dot)org> |
---|---|
To: | Steve Tucknott <steve(at)retsol(dot)co(dot)uk> |
Cc: | PostGreSQL <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Ambiguous columns |
Date: | 2005-07-05 21:38:21 |
Message-ID: | 42CAFDCD.6060102@visualdistortion.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Steve Tucknott wrote:
>If I have two tables(taba, tabb) with the same column (column1) name and
>try to do:
>
>SELECT taba.column1 AS column1,tabb.column2 AS column2
> FROM taba AS a
> JOIN tabb AS b
> ON taba.indexCol = tabb.indexCol
>GROUP BY column1
>
>It tells me that column1 is ambiguous. Is that to be expected? I can
>semi see why - but I thought you could only only group on selected
>fields, and the only 'selected' column1 is that from taba. Minor issue,
>with easy work around.
>
>
Oracle has a fun bug in this case when it picks which table/column to do
the group by on randomly. Or it uses some kind of crazy psychic power
to determine which table you DON'T mean, and use that.
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Fahrenkrog | 2005-07-05 22:42:53 | Batch Scripting of DB Objects to Separate Files |
Previous Message | John DeSoi | 2005-07-05 00:45:56 | Re: General Question |