outer join help needed urgent.. [message #38562] |
Fri, 26 April 2002 15:20 |
shreya
Messages: 15 Registered: March 2001
|
Junior Member |
|
|
Hi,
Here is my quey.
DROP TABLE my_acc_table;
CREATE TABLE my_acc_table AS
SELECT a.*
FROM schma1.user_table@x1 a,
schma2.user_table@x2 b
WHERE
a.start_date = '01-jan-02'
and b.start_date = '01-jan-02'
and a.user_id = b.user_id
and ABS(a.amount-b.amount) /
DECODE(a.amount,0,1,a.amount) >= 0.05;
I have to write outer join for this query.
user_id's may be different in both the schema.
I need both the left and the right outer join for this query.
If anyone knows how to do it please send it.
I would be very thankful to u.
Regards,
Sushma.
|
|
|
|
|
Re: outer join help needed urgent.. [message #38623 is a reply to message #38562] |
Wed, 01 May 2002 06:52 |
oraboy
Messages: 97 Registered: October 2001
|
Member |
|
|
Have a look at SQL new syntax available from 9i onwards. The messy and confusing (atleast for newbies) outer join operations (placing + this side or that side) are replaced by a simple syntax OUTER JOIN
select ..from table a LEFT OUTER JOIN table b
how abt that?
Oraboy
|
|
|