Column name

From: Linh Luong <linh(dot)luong(at)computalog(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Column name
Date: 2001-05-24 19:58:11
Message-ID: 3B0D67D3.716F3F6@computalog.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am trying to do a 2 joins between 3 tables.

ie)
select <some field>, coalesce(TRR.ABC, SOC.ABC) as newABC, ...
from A join (B join C on (..)) on (..)) as TRR
left join
(D join E on (..)) as SOC on (TRR.Field1=SOC.Field2)

When I run this it says that there is an ambiguous field. Yes after the
join for TRR and SOC they both contain a fields name ABC. How can I
rename this field in the sql statement or how can I make it so the sql
statement know that they are different.

Please help.. .thanks

--
Linh Luong
Computalog Ltd.
Software Developer
Phone: (780) 464-6686 (ext 325)
Email: linh(dot)luong(at)computalog(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steven D. Arnold 2001-05-24 20:16:19 strange stored procedure problem
Previous Message Ivan Likhachov 2001-05-24 19:45:18 FullText in postgres