Re: SQL command join question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL command join question
Дата
Msg-id 6756.1164848554@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SQL command join question  ("Ehab Galal" <ehabgalal123@hotmail.com>)
Список pgsql-sql
"Ehab Galal" <ehabgalal123@hotmail.com> 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 of the query.

Drop the alias on the outer join (the "t").  Per SQL spec, that masks
table names (and aliases) within the join from the rest of the query.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: SQL command join question
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: consistent random order