继续在我的SQL代码中出错 - "列无效"

时间:2017-03-16 07:28:56

标签: c# visual-studio tsql left-join where-clause

使用此SQL代码时出现错误。任何帮助将不胜感激。

        SELECT tblTempPacing.PROJ_ID, tblTempPacing.FSR, tblProjectInfo.CUSTNAME, tblProjectInfo.TITLEDESC, 
        tblProjectInfo.CSYN, tblProjectInfo.PROJSTATUS, tblProjectInfo.RELEASETYPE, tblRevenueModel.Rev_Rec_Model, tblRevenueModel.CM_Percent, 
        SUM(tblSubledger.Sales), tblCalcCurrQtrEstRev811Old.CQER_Total_Revenue, SUM(tblSubledger.GE_True_Cost), tblActualsAndEstimates.CurrQtrEstCosts, tblSubledger.Year, tblSubledger.Quarter

        FROM tblTempPacing LEFT JOIN tblProjectInfo ON tblTempPacing.PROJ_ID = tblProjectInfo.PROJ_ID
        LEFT JOIN tblRevenueModel ON tblTempPacing.FSR = tblRevenueModel.FSR
        LEFT JOIN tblCalcCurrQtrEstRev811Old ON tblTempPacing.FSR = tblCalcCurrQtrEstRev811Old.FSR
        LEFT JOIN tblSubledger ON tblTempPacing.FSR = tblSubledger.FSR
        LEFT JOIN tblActualsAndEstimates ON tblTempPacing.FSR = tblActualsAndEstimates.FSR

        WHERE tblRevenueModel.Rev_Rec_Model = 'SOP811' AND tblSubledger.Year = 2017 AND tblSubledger.Quarter = 4;

我在Visual Studio 2015中使用C#.SQL是SQLCommand的一部分。

My Error Message

The column is **tblTempPacing.PROJ_ID** is real

0 个答案:

没有答案