I have n MS Access fields that needs checking per row for one legal cell. A legal cell simply does not have the values "missing", "unknown"; or is not blank. All of these cells will be combined into a single field that only contains cell with legal values.
Referring to the table below,
Name_Final
will contain these legal cells from Name_2010
, Name_2011
and Name_2012
.
I already have two separate queries to help me do the job but I need to combine their results in order for me to get the Name_Final
field.
Query that returns non-null or non-empty cells
SELECT Nz(Name_2010, '') & Nz(Name_2011, '') & Nz(Name_2012, '') AS Name_Final
and the result is:
Filter cells with undesired values
SELECT Name_2010 Not In ('missing', 'unknown', 'Blank(s)', ' ', Nz), Name_2011 Not In ('missing', 'unknown', 'Blank(s)', ' ', Nz), Name_2012 Not In ('missing', 'unknown', 'Blank(s)', ' ', Nz) AS Name_Final FROM Table1;
This one returns 0
, -1
or blank for values indicated in the NOT IN
parenthesis, values not indicated in the NOT IN
parenthesis` or for blank values respectively.
Its output is:
I need to find a way to integrate these two sets of queries together to come up with Name_Final
. Please help SO Overlords.