I am trying to execute the following query. Although it executes correctly I do not get any results.
SELECT PatientProfile.Birthdate, DoctorFacility.OrgName, ApptType.Name, ApptSlot.Start, ApptSlot.Stop
FROM PatientProfile INNER JOIN
DoctorFacility ON PatientProfile.DoctorId = DoctorFacility.DoctorFacilityId
AND PatientProfile.FacilityId = DoctorFacility.DoctorFacilityId
AND PatientProfile.PrimaryCareDoctorId = DoctorFacility.DoctorFacilityId
AND PatientProfile.RefDoctorId = DoctorFacility.DoctorFacilityId
inner JOIN
ApptSlot ON DoctorFacility.DoctorFacilityId = ApptSlot.FacilityId
CROSS JOIN
ApptType
WHERE (DoctorFacility.OrgName LIKE 'Salem%') AND (ApptType.Name LIKE 'SBX%') OR
(ApptType.Name LIKE 'OBOT%')
I am very new to SQL queries so if I am going about this the wrong way please let me know.