I have an Employee table having list of employee names with IDs, from this they flow to two tables with below structure :
EMP Table
| ID | EMP_NAME |
|---|---|
| 100 | BOB |
create table EMP (ID varchar(20),EMP_NAME varchar(20));
insert into EMP values('100','BOB')
Table 1
| ID | NAME | DATE |
|---|---|---|
| 100 | BOB | 01-10-2021 |
| 100 | BOB | 01-11-2021 |
create table Table_1(ID varchar(20),NAME varchar(20), DATE date);
insert into Table_1 values('100','BOB','01-10-2021');insert into Table_1 values('100','BOB','01-11-2021');
Table 2
| ID | NAME | DATE |
|---|---|---|
| 100 | BOB | 01-11-2021 |
| 100 | BOB | 01-12-2021 |
create table Table_2(ID varchar(20),NAME varchar(20), DATE date);
insert into Table_2 values('100','BOB','01-11-2021');insert into Table_1 values('100','BOB','01-12-2021');
Table Date
| Month | DATE |
|---|---|
| Sep | 01-09-2021 |
| Oct | 01-10-2021 |
| Nov | 01-11-2021 |
| Dec | 01-12-2021 |
create table DATE(Month varchar(20), DATE date);
insert into DATE values('Sep','01-09-2021');insert into DATE values('Sep','01-10-2021');insert into DATE values('Sep','01-11-2021'); insert into DATE values('Sep','01-12-2021'))
I want to refer table table 3 (Date Table) to identify on which date of TABLE 3 record did not appear in TABLE 1 and 2 ( as in given case record having date = 01-09-2021 is the expected output)
Expected Output
| ID | NAME | DATE |
|---|---|---|
| 100 | BOB | 01-09-2021 |