0

Hi ,

I am working on a list :

Name Town Street House ID_Number
Marco Valletta Triq l-Ajkla 10, Fl 1 53290M
Mary Valletta Triq l-Ajkla 10, Fl 1 4748M
Victor Valletta Triq l-Ajkla 10, Fl 4 37867M
Krystle Valletta Triq l-Ajkla 14, Fl 1 52467M
Mariella Valletta Triq l-Ajkla 14, Fl 1 39093M
Therese Valletta Triq l-Ajkla 10, Fl 2 49346M
Emanuel Valletta Triq l-Ajkla 14, Fl 2 18536M
Patricia Valletta Triq l-Ajkla 14, Fl 2 15030M
Ramsey Valletta Triq l-Ajkla 14, Fl 2 49702M

I want to run a query which search with the ID cards 53290M, 52467M and 18536Mand provides me with those ID_Number information (name, town, street, house)** and** also other ID_Numbers which has the same Street and House.

Therefore it should result in :

Marco Valletta Triq l-Ajkla 10, Fl 1 53290M
Mary Valletta Triq l-Ajkla 10, Fl 1 4748M
Krystle Valletta Triq l-Ajkla 14, Fl 1 52467M
Mariella Valletta Triq l-Ajkla 14, Fl 1 39093M
Emanuel Valletta Triq l-Ajkla 14, Fl 2 18536M
Patricia Valletta Triq l-Ajkla 14, Fl 2 15030M
Ramsey Valletta Triq l-Ajkla 14, Fl 2 49702M

Thanks

2
Contributors
2
Replies
9
Views
3 Years
Discussion Span
Last Post by GilbertB
0
SELECT * FROM YourTable t1
LEFT JOIN YourTable t2 ON t1.Street = t2.Street AND t1.House = t2.House
WHERE ID_Number IN ('53290M', '52467M', '18536M')
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.