One Star

INNER / OUTER JOIN - TMAP & TJOIN

I have two tables T1 and T2 with a key
I need to know:
1) the rows in T1 not in T2 to generate a first file
2) the rows in T2 not in T1 to generate a second file
3) for the rows in the both tables, I have a field with the date of the last update. The most updated rows with generate a third file
What is the best way to implement it ?
Any ideas?
Thanks
Didier
1 REPLY
One Star

Re: INNER / OUTER JOIN - TMAP & TJOIN

Hi,
1) the rows in T1 not in T2 to generate a first file===> do a "T1 left outer join T2" where join_key is null
2) the rows in T2 not in T1 to generate a second file===do a "T2 left outer join T1" where join_key is null
3) for the rows in the both tables, I have a field with the date of the last update. The most updated rows with generate a third file===>T1 inner join T2 then you put a taggregate using max on the date of last update.
Regards