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!

Joining the table with multiple fields.

syed haiderSep 4 2019 — edited Sep 6 2019

I have a quick question and hoping I don't need to provide data for this question.

I need to join two tables with multiple fields. What is the best efficient way of doing that?

select cn.*, cl.*

from

        rpt_census_data cn

        left outer join rpt_report_client cl on (cn.account_number = cl.account_number

                                                and trim(cn.client_zip_code) = trim(cl.client_zip_code)

                                                and trim(upper(cn.client_city)) = trim(upper(cl.client_city))

                                                and trim(upper(cn.client_state)) = trim(upper(cl.client_state)))

Thanks in advance! Appreciate any quick feed back!

Comments
Post Details
Added on Sep 4 2019
9 comments
2,846 views