Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
select t.fk_transaction_code,
s.fk_system,
s.fk_customer,
s.fk_partner
from source.v_mapping_source s
left join ods.v_mapping_target t on (s.fk_system = t.fk_system OR t.fk_system = 0)
and (s.fk_function = t.fk_function OR t.fk_function = 0)
and (s.fk_customer = t.fk_netsuite_customer OR t.fk_netsuite_customer = 0)
and (s.fk_partner = t.fk_netsuite_partner OR t.fk_netsuite_partner = 0)
left join ods.v_mapping_target t on s.fk_system = t.fk_system
and s.fk_function = t.fk_function
and s.fk_customer = t.fk_netsuite_customer
and s.fk_partner = t.fk_netsuite_partner
My question is how to modify my tmap to hendle these OR clause in the lef join.
I'm going to look for the proper way to add an image of my tmap.
row6.fk_partner = row17.fk_netsuite_partner.
row6.fk_partner = row17.fk_netsuite_partner OR row17.fk_netsuite_partner = 0
(row6.fk_system==row17.fk_system || row17.fk_system==0)
&& (row6.fk_function==row17.fk_function || row17.fk_function==0)
&& (row6.fk_customer==row17.fk_netsuite_customer || row17.fk_netsuite_customer==0)
&& (row6.fk_partner==row17.fk_netsuite_partner || row17.fk_netsuite_partner==0)