0
試圖寫一個流利的查詢來完成以下內容:查找爲同一學生提供的服務,在同一日期但不同的代碼。 SQL查詢可能類似於:NHibernate查詢查找具有一些相同的列和一個表中的一些不同的記錄
select * from [Service] t1
where exists (
select
*
from [Service] t2
where
t1.StudentId = t2.StudentId and
t1.ServiceDate = t2.ServiceDate and
t1.ProcedureCodeId <> t2.ProcedureCodeId)