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: HELP! Oracle Won't Let Me Outer Join...

Re: HELP! Oracle Won't Let Me Outer Join...

From: Mark D Powell <mark.powell_at_eds.com>
Date: 8 Apr 2002 10:17:53 -0700
Message-ID: <178d2795.0204080917.6d78622b@posting.google.com>


contrapositive_at_hotmail.com (contrapositive) wrote in message news:<4e07f6b1.0204080514.718a8d3a_at_posting.google.com>...
> Hi. I have a query that looks something like this...
>
> SELECT ...
> FROM
> ORDER_HEADERS h,
> ORDER_DETAILS d,
> ...,
> INVOICES i
> WHERE ...
> AND
> decode(sign(d.TOTAL_PRICE), -1, 'C', 'D') --'C'redit/'D'ebit
> ||
> h.ORDER_NUMBER
> = i.INVOICE_NUMBER(+)
>
> So I need to outer join on INVOICES, but I get the "table may be outer
> joined to only one other table" error. I didn't realize this error
> also applies to concatenation.
>
> This is a legacy database, so I can't manipulate the table definitions
> or anything. Is there some creative way to work through this?
>
> Thanks in advance...
>
> -jk

JK, if the order number is carried in the order_details table then substitute d.order_number for h.order_number. Being that you do not show the join of the headers to details this is probably a partial query. It would probably be better to include all join conditions in the where clause to get the best possible response.

HTH -- Mark D Powell -- Received on Mon Apr 08 2002 - 12:17:53 CDT

Original text of this message

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