Skip site navigation (1) Skip section navigation (2)

SQL command join question

From: "Ehab Galal" <ehabgalal123(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQL command join question
Date: 2006-11-30 00:41:42
Message-ID: BAY24-F23D89B0EEF2CFB0C611FFA96DB0@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

I have three tables t1(a, b, c, d), t2(a, b, c, k), and t3(c, e). I need to 
outer join them as shown below, but only have all tuples from t1 as output. 
But the following syntax does not allow me to do so.

FROM (t1 outer join t2 on (t1.a=t2.a and t1.b=t2.b)) t outer join t3 on 

I'm getting the following error message:
ERROR:  invalid reference to FROM-clause entry for table "t1"
HINT:  There is an entry for table "t1", but it cannot be referenced from 
this part of the query.

I'll be grateful if someone may help me with this.


Fixing up the home? Live Search can help


pgsql-sql by date

Next:From: Phillip SmithDate: 2006-11-30 00:46:14
Subject: Re: SQL command join question
Previous:From: James RobinsonDate: 2006-11-29 17:59:50
Subject: Re: Subselects in CHECK clause ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group