I have 2 tables.
Table 1 is of the format:
NAME ID1 ID2
xxx xx xx
xxx xx xx
Table 2 is a lookup table of the format:
ID1 ID2 RESULT
xx xx
xxx xx
If the lookup table has a value in the ID1 column, I want it to match all records in Table 1 that have that ID1 with the RESULT.
If the lookup table has no value in ID1 and a value in ID2, I want it to match all records in Table 1 that have that value in ID2 with the RESULT.
How should I set up my query to do this?
Thanks!!
Table 1 is of the format:
NAME ID1 ID2
xxx xx xx
xxx xx xx
Table 2 is a lookup table of the format:
ID1 ID2 RESULT
xx xx
xxx xx
If the lookup table has a value in the ID1 column, I want it to match all records in Table 1 that have that ID1 with the RESULT.
If the lookup table has no value in ID1 and a value in ID2, I want it to match all records in Table 1 that have that value in ID2 with the RESULT.
How should I set up my query to do this?
Thanks!!