Select FileUpload.FileName AS FINAME, FileUpload.FilePath,MemberPersonalInformation.FirstName As SharedBy from FileUpload
INNER JOIN
ContentManagement ON ContentManagement.FileId=FileUpload.FileId
INNER JOIN
MemberPersonalInformation ON MemberPersonalInformation.MemberId=ContentManagement.CreatedBy
INNER JOIN
SubjectMaster ON ContentToIndividual.SubjectId=SubjectMaster.SubjectId
where
FileUpload.FileId in
(Select FileId from ContentManagement where ContentId in
(Select ContentId from ContentToIndividual where ShowToMemberId=12)
AND ContentManagement.ContentTypeId=1 and ContentManagement.SessionId=4)
加入雖然我執行這個查詢在最後得到一個錯誤的JOIN說The multi-part identifier "ContentToIndividual.SubjectId" could not be bound.
但我確實有兩個tables.I SubjectId無法理解什麼問題。請幫助我。問題與內蒙古在SQL服務器2005
如果您使用的是SQL管理工作室,則始終可以使用查詢設計器來解決此類問題。它幫助我分配時間 – Ivo 2011-06-15 11:05:24
消除子查詢是否加快了速度? – 2011-06-15 11:37:23