有關如何解決此查詢依賴性問題的任何想法?子查詢會有幫助嗎?我使用的數據庫是SQL Server 2012的SQL多重左加入子查詢?
FROM [Scheduling].[studentsection] AS [table027]
Left JOIN [Grading].[StudentGradeBucket] AS [table028]
ON ([table028].[StudentSectionID] = [table027].[StudentSectionID])
And (@0 = [table002].[label])
Left JOIN [Grading].[GradingPeriodGradeBucket] AS [table029]
ON [table028].[GradingPeriodGradeBucketID] = [table029].[GradingPeriodGradeBucketID]
Left JOIN [Grading].[GradeBucket] AS [table002]
ON [table029].[GradeBucketID] = [table002].[GradeBucketID]
Left JOIN [Grading].[GradeBucketType] AS [table001]
ON [table002].[GradeBucketTypeID] = [table001].[GradeBucketTypeID]
Left JOIN [Grading].[GradeMark] AS [table022]
ON [table028].[GradeMarkID] = [table022].[GradeMarkID]
的依賴問題,我已經是這個:
@0 = [table002].[label] //@0 is a string variable
像加入尚未創建,但我需要用它來創建聯接的關係[評分] [StudentGradeBucket]或[table028]
您需要對您的問題進行更具體的描述......您嘗試解決哪些依賴性問題? (側面說明...這是最古怪的表格別名我已經看到編碼一段時間) – Twelfth
我更新了我的帖子,更詳細。讓我知道你是否需要更多。 – user2529249
什麼是@ 0 - 你是指其中一個表中的一列,還是它是一個變量/參數?你使用的是哪個數據庫? – JohnLBevan