Multiple parameters, item a and any other that share other value

  • Thread starter Thread starter RA
  • Start date Start date
R

RA

I have a database of company phone numbers and their terminating points. I
want to take a primary number and find what other numbers route to that same
terminating point.

EX. 800-800-8008 routes to office ABC skill 1111, I want to know what other
numbers route to that same office ABC skill 1111.
 
Never mind, it's a two step query, first I search by main #, then in second
query I search for skill that is returned in first query
 
SELECT Office, PhoneNumber FROM CompPhones WHERE Office = "ABC skill 1111"
ORDER BY Office;

If you want to be able to select a specific office then create a combo on
your form that lists all the offices. Then change the WHERE to
WHERE Office = Forms!MyFormName.OfficeCombo
 
I have a database of company phone numbers and their terminating points. I
want to take a primary number and find what other numbers route to that same
terminating point.

EX. 800-800-8008 routes to office ABC skill 1111, I want to know what other
numbers route to that same office ABC skill 1111.

A single "self join" query will do this: add the table to the query grid
twice, joining the route fields. Put a criterion on the second instance's
phone field

<> [firstinstance].[phone]


John W. Vinson [MVP]
 
Back
Top