无法绑定多部分标识符

时间:2015-10-30 07:53:22

标签: sql-server

运行以下查询时出现此错误

SELECT
    T2.[AcctCode],
    T2.[AcctName],
    T5.[Name],
    SUM(T0.[Debit]) AS Actual,
    SUM(T3.[DebLTotal]) AS Budget
FROM [dbo].[JDT1] T0
     INNER JOIN [dbo].[OJDT] T1
         ON T0.[TransId] = T1.[TransId]
     INNER JOIN [dbo].[OACT] T2
         ON T0.[Account] = T2.[AcctCode],
     [dbo].[OBGT] T#
     INNER JOIN [dbo].[BGT1] T4
         ON T3.[AbsId] = T4.[BudgId]
     INNER JOIN OBGS T5
         ON T3.[Instance] = T5.[AbsId]
WHERE T2.[AcctName] LIKE '%Travel%'
AND T5.[Name] LIKE 'Main Budget 2015'
GROUP BY T2.[AcctCode], T2.[AcctName], T5.[Name]

0 个答案:

没有答案