I have a query that will return some results like
London 111
London 222
London 333
Manchester 333
Liverpool 111
Liverpool 222
Liverpool 333
Leeds 111
Leeds 222
Leeds 333
My stored procedure takes in a user defined table that is a list of codes like 111 and 222, but it could take in any number of codes depending on user input from a website
Given that 111 and 333 are passed in I want the SP to return London, Liverpool and Leeds (not manchester) because
They all have records with both these codes
Any clues on how I can achieve this?
Thanks!