Re: [SQL] SQL command join question

2006-11-29 Thread Tom Lane
"Ehab Galal" <[EMAIL PROTECTED]> writes: > SELECT t1.* > FROM (t1 outer join t2 on (t1.a=t2.a and t1.b=t2.b)) t outer join t3 on > (t1.c=t3.c); > 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

Re: [SQL] SQL command join question

2006-11-29 Thread Richard Broersma Jr
> SELECT t1.* > FROM (t1 outer join t2 on (t1.a=t2.a and t1.b=t2.b)) t outer join t3 on ^^ > (t1.c=t3.c); ^^ -- which one t or t1? > I'm getting the following error message: > ERROR: invalid reference to FROM-clause entry for table "t1"

Re: [SQL] SQL command join question

2006-11-29 Thread Stephan Szabo
On Wed, 29 Nov 2006, Ehab Galal wrote: > 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. > > SELECT t1.* > FROM (t1 outer join t2 on (t1.

Re: [SQL] SQL command join question

2006-11-29 Thread Phillip Smith
Would this be more appropriate...? SELECT t1.* FROM t1 OUTER JOIN t2 ON (t1.a=t2.a AND t1.b=t2.b) OUTER JOIN t3 ON (t1.c=t3.c); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ehab Galal Sent: Thursday, 30 November 2006 11: