Reputation: 173
I have a table that looks like this
In this table I have to filter my select query with a where clause with four particular combinations of tp1 and tp2. I want to select data based on (tp1= A and tp2 = A) and (tp1=B and tp2 = C). I think I might have to use case statements in the where clause but I am not sure how to do that.
Upvotes: 1
Views: 2218
Reputation: 1269493
Does this do what you want?
WHERE (tp1 = 'A' and tp2 = 'A') OR (tp1 = 'B' and tp2 = 'C')
Upvotes: 2