Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Outer Join ?

Re: Outer Join ?

From: Arjan van Bentem <avbentem_at_DONT-YOU-DARE-cable.a2000.nl>
Date: Wed, 15 Jul 1998 21:38:27 +0200
Message-ID: <6oj0fi$6sv$1@newton.a2000.nl>


>from wgm.wgm_comp w,
> wgm.prop_bk p
>where rtrim(w.barcode, ' ') (+) = rtrim(p.barcode, ' ')

You can not use rtrim(..) in combination with the outerjoin. This makes sense, as Oracle really needs to know for which table no data was found (as all columns of that table should return null for this very row). Now, if you were to use a function which would accept two parameters, say

    where nvl( table_a.col_1, table_b.col_2 ) (+) = table_c.col_3

then Oracle for sure would not know if table_a or table_b could not be matched to table_c. For the very same reason, you can not use rtrim(..).

However, if your barcode column is a varchar2, then you don't need to use rtrim(..) at all. If it is a char, then consider to make it a varchar2, which almost always is the best option anyway.

Arjan.
Hilversum, the Netherlands. Received on Wed Jul 15 1998 - 14:38:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US