1
我想重現這個SQL語句使用NH DetachedCriteria但努力獲得所有3內部聯接語句工作。NHibernate創建標準與3內連接表
SELECT a.*
FROM TableA a
INNER JOIN TableB b ON a.ProjectID = b.ProjectID
INNER JOIN TableC c ON b.OutlineAgreementID = c.OutlineAgreementID
INNER JOIN TableE e ON a.estimateid = e.estimateid
WHERE (b.ArchiveStatusID = 1)
AND (b.DateDeleted IS NULL)
AND (c.OutlineAgreementID = 14)
AND (e.PaymentStatusID = 5)
AND (e.TransferStatus = 1 OR e.TransferId IS NULL)
任何幫助將不勝感激?
內部連接是正確的。問題是什麼? –
這不是SQL的問題是轉換到NH DetachedCriteria語法 – Tim