Re: Curious Join issue causing an E_FAIL error (with odbc version 8.2.2.0)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Curious Join issue causing an E_FAIL error (with odbc version 8.2.2.0)
Дата
Msg-id 21787.1163175715@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Curious Join issue causing an E_FAIL error (with odbc version 8.2.2.0)  (Stijn Vanroye <s.vanroye@easytowork.nl>)
Ответы Re: Curious Join issue causing an E_FAIL error (with odbc version  (Stijn Vanroye <s.vanroye@easytowork.nl>)
Список pgsql-odbc
Stijn Vanroye <s.vanroye@easytowork.nl> writes:
> select
> <some fields>,
> C.id
> from
> A
> left join B on (A.fkB_id=B.id)
> left join C on (b.fkC_id=C.id)

> The above query produces the error.
> With some trial and error I managed to avoid the error by ommitting the
> C.id field from the select. Of course this is hardly a solution since I
> need those values ;)

> The next thing I tried was replace the C.id field with B.fkC_id (which
> have the same value since they form the join condition). No more error...

Um, well no they don't necessarily have the same value.  Since it's a
left join, C.id might read as null.

Perhaps your E_FAIL was a consequence of some bit of your code not being
prepared to cope with a NULL value?

            regards, tom lane

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

Предыдущее
От: Stijn Vanroye
Дата:
Сообщение: Curious Join issue causing an E_FAIL error (with odbc version 8.2.2.0)
Следующее
От: Stijn Vanroye
Дата:
Сообщение: Re: Curious Join issue causing an E_FAIL error (with odbc version