Received: from tmg.themecca.net (alewis@themecca.net [207.252.220.51]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA31577 for ; Mon, 2 Aug 1999 09:39:56 -0400 (EDT) (envelope-from alewis@themecca.net) Received: from localhost (alewis@localhost) by tmg.themecca.net (8.9.1/8.9.3) with ESMTP id IAA09187; Mon, 2 Aug 1999 08:39:45 -0500 Date: Mon, 2 Aug 1999 08:39:45 -0500 (CDT) From: Andy Lewis To: Christian Rudow cc: PostgreSQL SQL Subject: Re: [SQL] Using Aliases in Select In-Reply-To: <37A59B9C.79D5C4FB@thinx.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >