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!

Inner join with left join help

User_MS2CUApr 4 2017 — edited Apr 4 2017

hello,

I've 4 tables that I'm doing inner join. The inner join returns about 35 millions records. The data looks correct so far.

Now, I've new requirement where I've to add one more table. The new table has about 64k records.

The problem is that I've to perform a LEFT JOIN to the new table to get all records.

Here is my current sample query (works with right data) to pull 35 million records:

SELECT COUNT(*)

FROM                                                                                          

TABLE_A A,

TABLE_B B,

TABLE_C C,

TABLE_D D

WHERE A.FIELD_TEAM_ID=B.FIELD_TEAM_ID

AND C.TEAM_ID=A.TEAM_ID

AND D.TEAM_ID=C.TEAM_ID

The new table is TABLEXX_O O, which contains 64k data. How do I add a Left Join so I can make sure that I'm pulling the right data.

Please help!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2017
Added on Apr 4 2017
6 comments
3,925 views