I have to tables
table1 and table2
each of these tables has date1 and date2 respectively.
I have a process where I append the daily records from table2 to table1. I want to make sure they are not duplicated.
to do this I was thinking on checking and seeing that any of the dates in table2 exists in table 1
If any of the dates in table2.date2 exists in table1.date1
(Block select statement 1)
(block select statement2)
I just need some help with the first if statement. How do I write the query so that it checks if any of the values in date2 exists in date1 giving me a true or false value.