Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inner join within an Inner join 1

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
Good afternoon, I'm just looking for an explanation - quick or otherwise - for what this syntax actually means.

(dbo_Appointment INNER JOIN dbo_MPI ON dbo_Appointment .Patient = dbo_MPI.Patient) INNER JOIN dbo_Referrals ON dbo_Appointment .Referral_Ref = dbo_Referrals .Referral_Ref



Many thanks,
D€$
 
hi,

Same as
Code:
From 
  dbo_Appointment
, dbo_MPI 
, dbo_Referrals 
WHERE dbo_Appointment .Patient      = dbo_MPI.Patient
  and dbo_Appointment .Referral_Ref = dbo_Referrals .Referral_Ref
 
Hi Skip, thanks for that. Yes, I guess that makes sense as graphically there are joined that way.

Now, this seems similar but different:

dbo_AR_DateLookUp RIGHT JOIN (dbo_AR_ClinicCodes RIGHT JOIN dbo_CDI_OP_Appointment ON dbo_AR_ClinicCodes.Local_Clinic_Code = dbo_CDI_OP_Appointment.Clinic_Or_Facility_Code) ON dbo_AR_DateLookUp.Source_Date = dbo_CDI_OP_Appointment.Appointment_Date

Graphically
dbo_AR_DateLookUp is Right joined on Source_Date to dbo_CDI_OP_Appointment. Appointment_Date

AND

dbo_AR_ClinicCodes. Local_Clinic_Code is Right joined ON dbo_CDI_OP_Appointment. Clinic_Or_Facility_Code

Is this just how it looks when there are two tables joined to one common table?

Many thanks,
D€$
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top