RIGHT JOIN is only supported with mergejoinable join conditions

Поиск
Список
Период
Сортировка
От Nick Fankhauser
Тема RIGHT JOIN is only supported with mergejoinable join conditions
Дата
Msg-id NEBBLAAHGLEEPCGOBHDGGEDJDOAA.nickf@ontko.com
обсуждение исходный текст
Ответы Re: RIGHT JOIN is only supported with mergejoinable join  ("Josh Berkus" <josh@agliodbs.com>)
Re: RIGHT JOIN is only supported with mergejoinable join conditions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: RIGHT JOIN is only supported with mergejoinable join conditions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Hi-

I'm on version 7.1, and I'm getting this error when attempting to select
from a view:

RIGHT JOIN is only supported with mergejoinable join conditions

I don't understand what this error is telling me...

The script I have used to create the view is below pasted in below.
Essentially, I have a main table which I want to see every row from. I also
have two separate lookup tables that I want to get a description field from
*if* there is a matching code in a corresponding nullable field in the main
table. I tried pasting this into MSAccess, and it works fine there. (I know
this doesn't necessarily mean it is valid SQL <grin>.)

My questions are:
1)Have I done something wrong here, or am I hitting a limitation of
PostgreSQL?
2)In either case, how could I re-write this to make it work with PostgreSQL?

Thanks!

-Nick

create view demo as    select      case_data.case_id,      case_disposition_code.case_disp_global_desc,
local_case_type.global_case_type_desc   from      local_case_type      right join      (        case_disposition_code
    right join        case_data        on        case_disposition_code.case_disp_local_code =
case_data.case_disp_local_code     )      on      (        local_case_type.court_id =        case_data.court_id      )
   and      (        local_case_type.local_case_subtype_code =        case_data.local_case_type_code      )      and
 (        local_case_type.local_case_subtype_code =        case_data.local_case_subtype_code      );
 


--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/



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

Предыдущее
От: Denis Bucher
Дата:
Сообщение: Need help with embedded CASEs
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: Increasing MAX_ARGS