Re: RIGHT JOIN is only supported with mergejoinable join - Mailing list pgsql-sql

From Josh Berkus
Subject Re: RIGHT JOIN is only supported with mergejoinable join
Date
Msg-id web-500809@davinci.ethosmedia.com
Whole thread Raw
In response to RIGHT JOIN is only supported with mergejoinable join conditions  ("Nick Fankhauser" <nickf@ontko.com>)
List pgsql-sql
Nick,

> RIGHT JOIN is only supported with mergejoinable join conditions

Woof!  Talk about destruction testing.  You have ... let's see ... a
three-column right join on two right-joined tables.  If you ahve
uncovered a bug, I wouldn't be surprised.  

However, are you sure you want RIGHT OUTER JOINS and not LEFT?  Try
re-organizing the query as LEFT JOINS, and see if it works.  

create view demo
as     select       case_data.case_id,       case_disposition_code.case_disp_global_desc,       local_case_type.global_case_type_desc     from       ( case_data         left
join        case_disposition_code         on         case_data.case_disp_local_code
=         case_disposition_code.case_disp_local_code       )       LEFT JOIN local_case_type
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       ));

If that doesn't work, try making the case_data and case_disposition_code
join into a subselect.

-Josh 

______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: "Tille, Andreas"
Date:
Subject: Re: Design Tool for postgresql
Next
From: Stephan Szabo
Date:
Subject: Re: Need help with embedded CASEs