Re: JOINing the same table

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Query Builder (querybuilder_at_gmail.com)
Date: 02/07/05


Date: 7 Feb 2005 14:13:23 -0800

Are you saying you have a primary key that is been referenced as a
foreignkey in the same table? WHYyyyy?? Anyways, to solve your problem
for now, here is the query......

select E.LastName as EmpLastName,
(Select LastName as SupLastName from Employees Where employeeID =
E.SupervisorID)
from Employee E



Relevant Pages

  • Re: Q on designing and relating these 2 tables
    ... Autonumber field and designate it as primary key. ... i'm not sure i'd include ScheduledHours in this table, ... table EMPLOYEES describes each employee, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Q on designing and relating these 2 tables
    ... CEV, sorry to be so long, just got back to this thread. ... > I have one question though with the EmplPosID (Primary Key) field. ... >> table EMPLOYEES describes each employee, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Autonumber Fields
    ... What would you do to guarantee uniqueness in a Contacts table or some such ... I have a database that includes an Employees table. ... > Clustered Index can only be a Primary Key. ... >> Suppose I wanted to create a clustered index in an Access table. ...
    (microsoft.public.access.tablesdbdesign)
  • RE: How to automatically update data in form based on results of e
    ... is with the structure of your employees table. ... The foreign key field in the termination entry is "Name" ... The primary key in the Employees table is "Name" ...
    (microsoft.public.access.formscoding)
  • RE: How to automatically update data in form based on results of e
    ... Date are reserved words in Access and should not be used as field ... is with the structure of your employees table. ... The primary key in the Termination table is "Term ID" ...
    (microsoft.public.access.formscoding)