Hi,
I’m trying to write an IF ELSE THEN query in Access. I’m trying to write the query so that
if table1.column1 = table2.column2, then table2.column2
else
table1.column2
Here is my syntax I’ve used in the query builder:
IIf([Customer_template_09252008]![Country Code]=[Country codes]![Country Name],[Country codes]![Country Code],[Customer_template_09252008]![Country Code])
I need all rows returned in table1 (2537)
What this query is doing is returning only the rows that match (2382)
I need it to handle the missing 155 rows that do not match. For those 155, I need it to display the table1.column2 value.
Any help would be greatly appreciated!
Shannon
I’m trying to write an IF ELSE THEN query in Access. I’m trying to write the query so that
if table1.column1 = table2.column2, then table2.column2
else
table1.column2
Here is my syntax I’ve used in the query builder:
IIf([Customer_template_09252008]![Country Code]=[Country codes]![Country Name],[Country codes]![Country Code],[Customer_template_09252008]![Country Code])
I need all rows returned in table1 (2537)
What this query is doing is returning only the rows that match (2382)
I need it to handle the missing 155 rows that do not match. For those 155, I need it to display the table1.column2 value.
Any help would be greatly appreciated!
Shannon