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.
ANY IDEA WOT IS GOING WRONG IN ABOVE CODE??
THANKS IN ADVANCE