Ambiguous columns

From: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
To: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Ambiguous columns
Date: 2005-07-03 07:17:01
Message-ID: 1120375022.1326.11.camel@retsol1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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.
--

Regards,

Steve Tucknott
ReTSol Ltd

DDI 01903 828769
MOBILE 07736715772




___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2005-07-03 08:42:19 Re: [despammed] Ambiguous columns
Previous Message Steve Poe 2005-07-03 05:50:02 Re: General Question