The following SQL statement allows you to select records from one table that are not in another table based on a field common to both tables. For example, if you have a table, STATE1 and want to select all of the records from STATE1 that are not in CITY125.
- On the MAP tab, click SQL Select.
- Select Columns:
*
- from Tables:
STATE1
- where Condition:
Not state In (Select state From CITY125)
- into Table Named:
Selection
Note: The statement syntax is as follows: NOT columnname IN (SELECT columnname FROM secondtable) - Select Columns:
- This SQL statement produces a query of all records in the table STATE1.TAB that do not exist in CITY125.TAB.