may be because all doctors are not preffered doctors for patientsSELECT Appointment.AppointmentId, Doctor.Name AS [Doc Name], Doctor.Surname AS [Doc Surname], Patient.Surname AS [Patient Surname], Patient.Name AS [Patient Name]FROM Appointment INNER JOINDoctor ON Appointment.DoctorId = Doctor.ID LEFT JOINPatient ON Appointment.PatientId = Patient.Id AND Doctor.ID = Patient.PrefferedDoctor
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/