SQL INNER JOIN problem
The two table contains same data , but there could be missing rows
Row - Number- Row number
Company - Number - which is same for all the data
Loc - Text - changes for some records
EmpNo - Number - changes for some records
Key - unique key would be combination of set of some fields given below
Company + Loc + Empno+ StartDate
Table1
Row, Company, Loc, EmpNo, EmpName, BenType, Plan, StartDate, stopDate
1 4321 MN 1000 a X A date1
2 4321 MN 1000 a X B date2 date3
3 4321 MN 1000 a X B date5
( 3- Missing record in Table 2)
4 4321 SC 1010 b Y C date4
Table2
Row, Company, Loc, EmpNo, EmpName, BenType, Plan, StartDate, stopDate
1 4321 MN 1000 a X A date1
2 4321 MN 1000 a X B date2 date3
3 4321 SC 1010 b Y C date4
Note that Row is different
What could be the SQL query to retrive the data from table 1 which is present in table1 and missing in table 2
Thanks and Regards
Lawson, COBOL
__________________
Thanks and Regards
Lawson, COBOL
|