pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Fankhauser <nickf@ontko.com>
To: PGSQL-SQL <pgsql-sql@postgresql.org>
Subject: RIGHT JOIN is only supported with mergejoinable join conditions
Date: Wed, 7 Nov 2001 11:16:38 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGGEDJDOAA.nickf@ontko.com> (raw)

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/




view thread (8+ messages)  latest in thread

Message-ID: <NEBBLAAHGLEEPCGOBHDGGEDJDOAA.nickf@ontko.com>
Permalink:  ../NEBBLAAHGLEEPCGOBHDGGEDJDOAA.nickf@ontko.com/
Also on:    postgresql.org/message-id/NEBBLAAHGLEEPCGOBHDGGEDJDOAA.nickf@ontko.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: nickf@ontko.com
  Subject: Re: RIGHT JOIN is only supported with mergejoinable join conditions
  In-Reply-To: <NEBBLAAHGLEEPCGOBHDGGEDJDOAA.nickf@ontko.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox