Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

FULL OUTER JOIN

189396Jan 25 2006 — edited Jan 25 2006
Hi

Is it necessary for two tables to have foreign key relationship, if we are joning them using a FULL OUTER JOIN ?

Because I have a query in which two queries are used as tables and are joined using FULL OUTER JOIN. And it doesn't give me all the rows from both the queries.

My sql is:
Select mv_base.book_asof_date, mv_up.book_asof_date, mv_up.market_value-mv_base.market_value
From
(Select v1.dw_run_id, v1.book_asof_date book_asof_date, Sum(Nvl(f.market_value,0)) market_value
from RM_DW_TIME_SERIES_REPORTS_VW v1, rm_dw_book_f f
where v1.dw_run_id=f.dw_run_id
and v1.run_name='daily.std.0.base.0'
and v1.application_name='PVMReporting'
Group By v1.dw_run_id, v1.book_asof_date
) mv_base full outer join
(Select v.dw_run_id, v.book_asof_date book_asof_date, Sum(nvl(f.market_value,0)) market_value
from RM_DW_TIME_SERIES_REPORTS_VW v, rm_dw_book_f f
where v.dw_run_id=f.dw_run_id
and v.run_name='daily.std.0.up50.0'
and v.application_name='PVMReporting'
Group By v.dw_run_id, v.book_asof_date
) mv_up
ON mv_base.book_asof_date=mv_up.book_asof_date;

Any answers will be appreciated.
Shalu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2006
Added on Jan 25 2006
2 comments
333 views