I tried the following Select statement but is incorrect. I will apreciate if anyone can help me out in the comparison of the two temp tables. Thanks!!!!Select a.station_nbr, a.station_name,a.group_code, a.beg_eff_date_DGC, a.end_eff_date_DGC,b.beg_eff_date_SES, b.end_eff_date_SESINTO #TP_DGC_vs_SESFrom #TP_DGC a left outer join #TP_SES bon a.station_nbr=b.station_nbr and a.group_code = b.group_code#TP_SES c left outer join #TP_DGC don c.station_nbr=d.station_nbr and c.group_code = d.group_codeWHERE (a.group_code = b.group_code)and(a.station_nbr = b.station_nbr)and (b.station_nbr is not Null)