Reverse of inner join query
Posted on 2004-04-07
The query below does a match between 2 tables and returns 4,100 records. I would now like to run a query that returns the gap which is 472 records (the unmatched records not returned from the HR_CTI table). Basically, I need to inverse the query to find those records that did not match. Hope this makes sense.
SELECT GD_Dump.ID, GD_Dump.EMPLID, GD_Dump.LAST_NAME, GD_Dump.FIRST_NAME, GD_Dump.NAME, GD_Dump.LOCATION, GD_Dump.DESCR, GD_Dump.ADDRESS1, GD_Dump.ADDRESS2, GD_Dump.ADDRESS3, GD_Dump.CITY, GD_Dump.STATE, GD_Dump.POSTAL, GD_Dump.PHONE, GD_Dump.COUNTRY
FROM GD_Dump INNER JOIN HR_CTI ON (GD_Dump.FIRST_NAME = HR_CTI.Fname) AND (GD_Dump.LAST_NAME = HR_CTI.Lname);