when execuitng this stored procedure
select t.OF_Feescode , t.OF_FeeHeadname,t.OF_FeeAmount, concession = (SELECT OF_FeesPercentage
FROM OF_Concession where OS_IdNo='4734' and OF_AcademicYear=(select acdyear from OP_Academicyear)
and OF_FeesHeadCode in ( SELECT OF_FeeHeadcode FROM OF_FeeHeads WHERE OF_GroupCode=1) and
OF_Feescode = t.OF_Feescode
), totalfee = sum(t.OF_FeeAmount + concession)
from tempTable t
I got error as Invalid column name 'concession'.
Could anyone pls help me to solve this?
I want to get sum of OF_FeeAmount and concession