Right Outer Join - ORA-01719 [message #603436] |
Mon, 16 December 2013 10:58  |
 |
praveenramaswamy
Messages: 34 Registered: December 2013
|
Member |
|
|
Is there an option instead of Right Outer Join. Because in one of my query i need to use "AND" or "OR" operation within an Right Outer Join and i get the ORA-01719 error. Can you please let me if or what kind of sub-query i can use instead of Right Outer Join
|
|
|
|
Re: Right Outer Join - ORA-01719 [message #603439 is a reply to message #603437] |
Mon, 16 December 2013 11:18   |
 |
praveenramaswamy
Messages: 34 Registered: December 2013
|
Member |
|
|
Select orde.no orde_no,
orli.no orli_no,
TO_CHAR(orde.created_date, 'DD/MON/YYYY') created_date,
DECODE(orli.status,
'V',
'Voided',
'R',
'Regular',
'F',
'Foreign Shipment Pending',
'C',
'Cancelled',
'B',
'Back Ordered') orli_status,
orli.prod_prds_product_code product_code,
orli.prod_item_number item_number,
prod.full_title prod_description,
sum(orli.quantity) quantity,
sum(orli.licensed_quantity) licensed_quantity,
sum(orli.product_charge) product_charge,
DECODE(orli.standing_order_flag, 'N', 'NO', 'Y', 'YES') standing_order_flag,
TO_CHAR(orli.gds_date, 'DD/MON/YYYY') gds_date,
inli.invo_no invoice_number,
sum(ilac.net_amount) net_amount,
orde.acco_no account_number
From orders orde,
Order_line_items orli,
Products prod,
Invoice_line_items inli,
Invoice_line_item_adj_cancels ilac
Where (trunc(orde.created_date) > add_months(trunc(sysdate), -24) And
orli.orde_no = orde.no And
prod.prds_product_code = orli.prod_prds_product_code And
prod.item_number = orli.prod_item_number And
prod.product_type not in ('BBSB', 'BBSS', 'SUB', 'PARU', 'SUBS') And
inli.orli_orde_no(+) = orli.orde_no And inli.orli_no(+) = orli.no And
ilac.inli_invo_no(+) = inli.invo_no And ilac.inli_no(+) = inli.no)
OR ((orli.created_date >= &p_date or orli.modified_date >= &p_date) or
(inli.created_date >= &p_date or inli.modified_date >= &p_date));
When i run the above query I get the error message
ORA 01719: outer join operator (+) not allowed in operand of OR or IN
So i was wondering if i can bypass the Right Outer Join condition with a sub-query. But wasnt sure how to accomplish this.
|
|
|
|
|
Re: Right Outer Join - ORA-01719 [message #603446 is a reply to message #603439] |
Mon, 16 December 2013 11:53  |
 |
Michel Cadot
Messages: 68770 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
So remove all what does not cause the problem from your query, post a simple test case and we can show you how to modify it.
But anyway, just use ANSI syntax.
|
|
|