Re: [despammed] Ambiguous columns

From: Andreas Kretschmer <akretschmer(at)despammed(dot)com>
To: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [despammed] Ambiguous columns
Date: 2005-07-03 08:42:19
Message-ID: 20050703084219.GA20791@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

am 03.07.2005, um 8:17:01 +0100 mailte Steve Tucknott folgendes:
> 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

untestet:

SELECT a.column1 AS column1,b.column2 AS column2
FROM taba a
JOIN tabb b
ON a.indexCol = b.indexCol
GROUP BY a.column1

Regards, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-07-03 16:07:21 Re: Ambiguous columns
Previous Message Steve Tucknott 2005-07-03 07:17:01 Ambiguous columns