Re: left join conditon causes error

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: left join conditon causes error
Дата
Msg-id dcc563d10810100725s7f1c2fc4w9cee5a315d7400b3@mail.gmail.com
обсуждение исходный текст
Ответ на left join conditon causes error  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-general
2008/10/8 Andrus <kobruleht2@hot.ee>:
> Query

Query deleted for brevity

> ERROR:  invalid reference to FROM-clause entry for table "destkonto"
> LINE 7: ...              =sihrkurs.kuupaev AND sihrkurs.raha=destkonto....
>                                                            ^
> HINT:  There is an entry for table "destkonto", but it cannot be referenced
> from this part of the query.

It's a question of precedence.

select * from a,b join c ...

is execute in the order of

b join c

then a join that result.  By the way, this is how the sql spec says to do it.

So, you can't join b to c based on anything from a, because a hasn't
been joined yet.  I would recommend using explicit join syntax only
and see how that works for you.

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

Предыдущее
От: "postgres Emanuel CALVO FRANCO"
Дата:
Сообщение: Re: Opteron vs. Xeon performance differences
Следующее
От: "Grzegorz Jaśkiewicz"
Дата:
Сообщение: Re: Using subquery or creating temp table