Create a self-join

Microsoft Query

Create a self-join

Use this procedure to combine information from two copies of one table — for example, when a table of employee information includes the employee ID of each employee's manager and you want to combine the ID number with the name of the manager. This procedure creates a type of query called a self-join. Learn about self-joins.

  1. Create a query in Microsoft Query, and add the table that you want to join to itself to the query.
  2. Add the same table to the query a second time.
  3. When prompted that the table is already in the query, click OK.
  4. If Query automatically joins the two tables, double-click the join line, click Remove, and then click Close.
  5. Create an inner join between the two tables. For example, if the Manager field uses the employee ID to identify the managers, you can join the Manager field in the first table to the Employee ID field in the second table.
  6. Add the fields you want to your query. For example, you can add the Employee Name and Manager fields from the first table, and then add the Employee Name field from the second table to see the name of each employee's manager.