Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: HELP! Oracle Won't Let Me Outer Join...
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
![]() |
![]() |