Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Outer Join ?
You can use an expression with column having (+) operator. That is use
where rtrim(w.barcode(+), ' ') = rtrim(p.barcode, ' ')
raghuvir
Mark Wolak <wolakm_at_flash.net> wrote in article
<35ACFFD2.FD5D8A14_at_flash.net>...
> Hi,
> A quick Question.
> I am trying to all of the records to display where
> p.hr_no is equal to 253 (253 will eventually be replaced
> by a user input parameter.)
> I know all of the barcodes are not entered into the
> table wgm_comp I want to return null values
> for barcode and userid where they don't exist.
>
> I keep getting error messages.
> The select statement works without the (+)
> operator which is supposed to provide null where
> there is no direct match.
>
> What Am I Missing?
>
>
>
> Thank You in advance
>
>
> select
> w.barcode,
> w.userid,
> p.BARCODE,
> p.LOCATION,
> p.SER_NO,
> p.MFG_NM,
> p.MFG_PN,
> p.HR_NO,
> from wgm.wgm_comp w,
> wgm.prop_bk p
> where rtrim(w.barcode, ' ') (+) = rtrim(p.barcode, ' ')
> and '253' = rtrim(p.hr_no, ' ')
> order by userid
>
> I get....
>
> where rtrim(w.barcode, ' ') (+) = rtrim(p.barcode, ' ')
> *
> ERROR at line 12:
> ORA-00920: invalid relational operator
>
>
>
> error 920 is
> ORA-00920 invalid relational operator
>
> Cause: A search condition was entered with an invalid or
> missing relational operator.
>
> Action: Include a valid relational operator such as =,
> !=, ^=, <>, >, <, >=, <=, ALL, ANY, [NOT] BETWEEN, EXISTS,
> [NOT] IN, IS [NOT] NULL, or [NOT] LIKE in the condition.
>
>
>
> Here is my environment
> Oracle7 Server Release 7.3.2.3.0 - Production Release
> With the distributed, replication and parallel query options
> PL/SQL Release 2.3.2.3.0 - Production
>
>
Received on Wed Jul 15 1998 - 21:42:08 CDT
![]() |
![]() |