多部分标识符无法绑定 [英] The multi-part identifier could not be bound

查看:80
本文介绍了多部分标识符无法绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我正在尝试以下代码:

HELLO FRIENDS,

I WAS TRYING FOLLOWING CODE:

Declare @empid int, @ReviewMonth varchar(6), @probPerc int,
@curFiscYr varchar(4), @geoid varchar(10),
@startDate varchar(10), @vcid varchar(10),
@endDate varchar(10), @accountid bigint 
SET @geoid = ''BUUK''
SET @vcid = 1
SET @ReviewMonth = ''201203''
SET @empid = 8047
SELECT @curFiscYr = substring(dbo.FWB_ufn_GetFiscalYear(@ReviewMonth),1,4)    
SET @startDate = @curFiscYr + ''-07-01''
SET @endDate = convert(varchar,(convert(int,@curFiscYr) + 1)) + ''-06-30''
SELECT [include],OPP.* FROM FWB_Opportunities OPP
INNER JOIN dbo.FWB_ufn_GetOpportunity(@empid) GETOOP ON OPP.OpportunityId = GETOOP.OpportunityID 
AND GETOPP.ReviewMonth = @ReviewMonth
LEFT JOIN [FWB_ufn_GetOppForecasted_REV_RevenueFCReport_Incl/Excl](@ReviewMonth,@curFiscYr) OFR    
        ON GETOPP.OpportunityID=OFR.OppID    
WHERE OPP.ReviewMonth = @ReviewMonth AND (ClosedDate Between @startDate AND @endDate)
GROUP BY [include]




我出现以下错误:




I GOT FOLLOWING ERROR:

Msg 4104, Level 16, State 1, Line 16<br />
The multi-part identifier "GETOPP.ReviewMonth" could not be bound.<br />
Msg 4104, Level 16, State 1, Line 16<br />
The multi-part identifier "GETOPP.OpportunityID" could not be bound.



上面的代码中有任何想法错误吗?

感谢ADVANCE



ANY IDEA WOT IS GOING WRONG IN ABOVE CODE??

THANKS IN ADVANCE

推荐答案

拼写:
INNER JOIN dbo.FWB_ufn_GetOpportunity(@empid) GETOOP ON OPP.OpportunityId


GETOOP


GETOOP

AND GETOPP.ReviewMonth = @ReviewMonth


GETOPP


GETOPP


这篇关于多部分标识符无法绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆