From: Andy Lewis <alewis@themecca.net>
To: Christian Rudow <Christian.Rudow@thinx.ch>
Cc: PostgreSQL SQL <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] Using Aliases in Select
Date: Mon, 2 Aug 1999 08:39:45 -0500 (CDT)
Message-ID: <Pine.LNX.4.05.9908020838110.9077-100000@tmg.themecca.net> (raw)
In-Reply-To: <37A59B9C.79D5C4FB@thinx.ch>
I'll take a stab at this one:
Try:
select tab1.name, tab1.mytext as text1, tab2.mytext as text2
from tab1, tab2 where tab1.tab1_id = tab2.tab1_id
I believe that this will fix it.
Andy
On Mon, 2 Aug 1999, Christian Rudow wrote:
> I join 2 tables that both have a row "mytext".
> I want to use both text fields in the select (projection) clause, giving
> alias names to them.
>
> select tab1.name, tab1.mytext text1, tab2.mytext text2
> from tab1, tab2
> where tab1.tab1_id = tab2.tab1_id
>
> but ...
>
> ERROR: Column 'mytext' is ambiguous
>
> Is there a solution to this ?
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Christian Rudow E-Mail: Christian.Rudow@thinx.ch
> ThinX networked business services Stahlrain 10, CH-5200 Brugg
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: alewis@themecca.net, Christian.Rudow@thinx.ch
Subject: Re: [SQL] Using Aliases in Select
In-Reply-To: <Pine.LNX.4.05.9908020838110.9077-100000@tmg.themecca.net>
References: <37A59B9C.79D5C4FB@thinx.ch> <Pine.LNX.4.05.9908020838110.9077-100000@tmg.themecca.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox