pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Linh Luong <linh.luong@computalog.com>
To: pgsql-sql@postgresql.org
Subject: Select for LEFT JOIN
Date: Thu, 24 May 2001 15:04:04 -0600
Message-ID: <3B0D7744.839FEC25@computalog.com> (raw)

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.luong@computalog.com



view thread (2+ messages)  latest in thread

Message-ID: <3B0D7744.839FEC25@computalog.com>
Permalink:  ../3B0D7744.839FEC25@computalog.com/
Also on:    postgresql.org/message-id/3B0D7744.839FEC25@computalog.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: linh.luong@computalog.com
  Subject: Re: Select for LEFT JOIN
  In-Reply-To: <3B0D7744.839FEC25@computalog.com>

* 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