X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0CAB79FB262 for ; Thu, 7 Sep 2006 11:04:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 61375-02-8 for ; Thu, 7 Sep 2006 11:04:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from perseverance.encs.concordia.ca (perseverance-96.encs.concordia.ca [132.205.96.94]) by postgresql.org (Postfix) with ESMTP id 69B089FB2CE for ; Thu, 7 Sep 2006 11:02:50 -0300 (ADT) Received: from [132.205.47.225] (emilu@cacao.encs.concordia.ca [132.205.47.225]) by perseverance.encs.concordia.ca (8.13.7/8.13.7) with ESMTP id k87E2ncu002534 for ; Thu, 7 Sep 2006 10:02:49 -0400 Message-ID: <45002689.9050307@encs.concordia.ca> Date: Thu, 07 Sep 2006 10:02:49 -0400 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Is it possible to left join based on previous joins result References: <45001AF6.4020706@encs.concordia.ca> In-Reply-To: <45001AF6.4020706@encs.concordia.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.43 on perseverance.encs.concordia.ca at 2006/09/07 10:02:49 EDT X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.039 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/49 X-Sequence-Number: 26260 I tried the example as the following: create table a(col1); create table b(col1, col2) select a.* from a inner join b using(col2) left join b.col2 as c on (c.col1 = a.col1) System notifies me that b is not a schema name. So, I guess the approach that I tried to do is not acceptable by Pgsql grammar. > > Is it possible to do something like: > > select ... > from t1 > inner join t2 ... > left join t2.colN > > When t1 inner join with t2 I got unique result for t2.colN( colN's value > is table name). > > Can I continue to left join with the column "colN" in table t2? > > Thanks > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org