October 6, 2011 at 1:13 am
SELECT C.Clstr_Nm,C.CH_typ,
Sum(C.MTD_TRCDMA) 'MTD_TRCDMA',
SUM(C.LMTD_TRCDMA)'LMTD_TRCDMA',
'%Growth' = (Round((CAST(sum(MTD_TRCDMA)AS FLOAT))-(CAST(sum([LMTD_TRCDMA])AS FLOAT)) /(CAST(sum([LMTD_TRCDMA])AS FLOAT,2))))
from TR_RECHARG C
Left outer Join ER_Main E on C.CRT_Cod=E.CRT_Cod
Left outer Join Rch_Vouchsep11 R on E.ER_MDN=R.Donor_MDN
where C.Clstr_Nm in ('Bengaluru B','Bengaluru W') and Lead_CDMANm not in ('','Terminated')
Group By C.Clstr_Nm,C.CH_typ
Order By C.Clstr_Nm,C.CH_typ
-----------------------------------------
Error : Msg 102, Level 15, State 1, Line 4
Incorrect syntax near ','.
Thanks & Regards
Sabari
October 6, 2011 at 1:35 am
Where need to give
SELECT C.Clstr_Nm,C.CH_typ,
Sum(C.MTD_TRCDMA) 'MTD_TRCDMA',
SUM(C.LMTD_TRCDMA)'LMTD_TRCDMA',
'%Growth' = (Round((CAST(sum(MTD_TRCDMA)AS FLOAT))-(CAST(sum([LMTD_TRCDMA])AS FLOAT)) /(CAST(sum([LMTD_TRCDMA])AS FLOAT,2))))
from TR_RECHARG C
Left outer Join ER_Main E on C.CRT_Cod=E.CRT_Cod
Left outer Join Rch_Vouchsep11 R on E.ER_MDN=R.Donor_MDN
where C.Clstr_Nm in ('Bengaluru B','Bengaluru W') and Lead_CDMANm not in ('','Terminated')
Group By C.Clstr_Nm,C.CH_typ
Order By C.Clstr_Nm,C.CH_typ
Thanks & Regards
Sabari
October 6, 2011 at 1:21 pm
It seems like you just reposted the original query.
Did you even try to follow the hint given by BrainDonor? :unsure:
What exactly do you mean by "Where need to give"?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply