Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted

1 solution

Spelling:
SQL
INNER JOIN dbo.FWB_ufn_GetOpportunity(@empid) GETOOP ON OPP.OpportunityId

GETOOP

SQL
AND GETOPP.ReviewMonth = @ReviewMonth

GETOPP
 
Share this answer
 
Comments
Mohamed Mitwalli 8-May-12 9:45am    
5+
Monjurul Habib 8-May-12 16:33pm    
5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900