[FAQ000141]How do I compare two tables and search for data that does not match?

Q

Is there a way to compare two tables and get the data that only exists
in one of the tables?

For example, I want to retrieve data that exists in table A, but not in table B.

A

There is a way to retrieve data that exists only on one side by
executing SQL with the NOT EXISTS clause
using the extended option CELF SQL action (*).

■SQL Examples
SELECT
[ColumnA]
FROM
[TableA]
WHERE
NOT EXISTS (
SELECT
[ColumnB]
FROM
[TableB]
WHERE
[SampleA].[ColumnA] = [SampleB].[ColumnB]
)


■Execution result
Records that exist in [Column A] of [Table A] but do not exist
in [Column B] of [Table B] will be extracted.


(*) For more information on CELF SQL actions, please refer to the following.