OUTTER JOINS

From: Doug Hewko <doug.hewko_at_synapse.org>
Date: Sun, 16 Jan 94 10:11:00 -0500
Message-ID: <1d.4260.2378.0NEDDFF6_at_synapse.org>


How would someone create an outter join, between two tables, that involves three columns? The two tables require three keys to join. The outter join feature (+) is limited to one column. There may or may not be a relationship between the two tables.

For example, I want to do:

   SELECT a.col1, a.col2, b.col3
    FROM table_a a, table_b b

    WHERE a.table_name = UPPER('&user_input_value')
     AND  a.table_name = b.table_name (+)
     AND  a.owner_name = b.owner_name (+)
     AND  a.column_name = b.column_name (+)
   ORDER by a.column_name ASC;

..but unfortunately ORACLE 6 does not accept multiple '(+)'s even though they all relate to ONE table.ÿ

I have made an intermit solution by creating a temporary table, moving some data there, and then erasing that temporary table. A possible problem with this is the creation of duplicate tables. (Of course this can be solved by using the DISTINCT command when creating the table, and relating that to the ACCESSIBLE_TABLES database, but then again, what if a duplicate occurs in a table which the user does not have access to?)

Doug

---
 þ 1st 1.11 #574 þ Bad Command. Bad, Bad, Command! Sit! Staaay!
Received on Sun Jan 16 1994 - 16:11:00 CET

Original text of this message