I have a database query that has a condition which filters by values in an array. That returns every row that has any of the values passed in the array. What I need is to return only the rows that contain all of the values.
So, for instance I have tasks and each task is assigned to multiple people.
Task 1 - John, Sue, Jack, Jenny
Task 2 - Sue, Jenny
Task 3 - John, Sue
Task 4 - John, Sue, Jack
Task 5 - Jack, Jenny
Right now if I select John and Sue I get back Tasks 1,2,3 and 4 because one of them is in those tasks.
What I need returned is tasks 1,2 and 3. Just the ones that they are both in.
Any ideas?