下面的代碼拋出一個錯誤:如何檢查列值的組合在SQL Server表
select *
from inPersonMedChangeNotes as IP
where
(IP.[Date], IP.Patient) not in (select EncounterDate, Patient
from tbl_patients_clinic_visit_records as VC
join tbl_patients as PS on VC.PatientId = PS.PatientId_this)
錯誤:
non boolean expression where condition is expected
我試圖找到inPersonMedChangeNotes所有條目值的組合不在tbl_patients_clinic_visit_records表中。我該怎麼做呢?
你不能爲你的'不in'子句中使用多列... – SoulTrain 2015-02-05 16:55:43