Skip to content
Advertisement

SQL query with NULL Value Comparison in MS Access

I am trying to compare two tables and output results where a column in table1 and the same column in table2 are not equal.

The query looks like this:

Column1, Column2, Column3 together form the primary key for the two tables.

When Column4 has missing values (null), the corresponding record is not showing up as a mismatch in the resulting output.

(This is happening with other columns as well, be it Text or Number or Date/Time data type)

Any Comments?

Advertisement

Answer

You need a LEFT Join, not an INNER join.

You might like to say:

Concatenating a zero-length string with the field will ensure that a comparison between a value and null will show up.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement