I need to select a value (Id) from a table based on matching items in 2 lists.
List 1 = ('Tony','Adam','Mark') List 2 = ('Everton', 'Arsenal', 'Villa')
Id,Number, Name, Team 1, 100, Mark, Villa 2 110, Tony, Everton 3 120, Adam, Arsenal
Let's say that a query was done to pull only the name and team. I need take the results and get the number.
But I need a query using the lists from top to bottom so first items on List A AND List B, then the 2nd, 3rd and so forth.
I need both Name and Team to match in the same row.
I hope I've explained that clearly.
Select Number, Name, Team where Name = (list A) and Team = (list B).
Select Number from Teams where name = 'Tony' and team = 'Everton'
would give 110
but I need to do it on multiple values in one go.