ID Place Name Type Count
--------------------------------------------------------------------------------
7718 | UK1 | Lemuis | ERIS TELECOM | 0
7713 | UK1 | Astika LLC | VERIDIAN | 34
7712 | UK1 | Angel Telecom AG | VIACLOUD | 34
7710 | UK1 | DDC S.r.L | ALPHA UK | 25
7718 | UK1 | Customers | WERTS | 0
Basically I have a variable and I want to compare that variable the the 'Type' column. If the variable matches the type then I want to return all the rows that have the same ID as the variable's ID.
For example, my variable is 'ERIS TELECOM', I need to retrieve the ID for 'ERIS TELECOM' which is 7718. Then I search the table for rows that have the ID 7718.
My desired output should be:
Table Name: FullResults
ID Place Name Type Count
--------------------------------------------------------------------------------
7718 | UK1 | Lemuis | ERIS TELECOM | 0
7718 | UK1 | Customers | WERTS | 0
Is there a query that will do this?