Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f4SCieA99562 for ; Mon, 28 May 2001 08:44:40 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from mail.computalog.com ([209.82.103.230]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4OKvGA31543 for ; Thu, 24 May 2001 16:57:17 -0400 (EDT) (envelope-from linh.luong@computalog.com) Received: from jamie.edmonton.computalog.com (mugeri.computalog.com [209.82.103.229]) by mail.computalog.com (8.8.8/8.8.8) with ESMTP id OAA10954 for ; Thu, 24 May 2001 14:57:13 -0600 Received: from computalog.com (localhost [127.0.0.1]) by jamie.edmonton.computalog.com (Postfix) with ESMTP id 9C7B6197397 for ; Thu, 24 May 2001 15:04:04 -0600 (MDT) Message-ID: <3B0D7744.839FEC25@computalog.com> Date: Thu, 24 May 2001 15:04:04 -0600 From: Linh Luong X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-pentiumiii-smp i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Select for LEFT JOIN Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200105/291 X-Sequence-Number: 3119 Hi, I am trying to do a 2 joins between 3 tables. ie) select , 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