I built a union query, combining the fields from table_A, table_B, and table_C.
However, I want to exclude table_C only if the inactive_date is not null (data stored in a master_list table). This master_list table lists all of the tables within the database.
I tried to insert some iif/then logic with the SQL code of the union query, but to no avail.
I see that I can enter an iif statement for each field, but I'd like to be able to enter it once for the whole table.
A.) Is this possible?
B.) what is the best method?
thanks!
However, I want to exclude table_C only if the inactive_date is not null (data stored in a master_list table). This master_list table lists all of the tables within the database.
I tried to insert some iif/then logic with the SQL code of the union query, but to no avail.
I see that I can enter an iif statement for each field, but I'd like to be able to enter it once for the whole table.
A.) Is this possible?
B.) what is the best method?
thanks!