Code1 | Code2 | Code3
----------------------
101| 102 | null
101| null | null
102| 104 | null
The above is the table called DiagCodes
Select * From Where
Where condition should check all the three columns Code1, Code2 and Code3.
Result: return the rows that has only the codes IN (101, 102)
So, where condition should return the first and second rows only Third row shouldn't be returned because it has 104 code.
How do I write the where clause to check this condition?
I'd expect something like this to work: