hello,
I am facing a problem with the following code:
select year(regdate) as [Year],month(regdate) as [Month],
CONVERT(varchar(3),regdate,100)as inmonth,
count(*) as incount, cast(sum(amt)as decimal(20,2))as insum,
count(case when nbr <>' ' then amt else Null end) as incountpo,
SUM(case when nbr <>' ' then (amt)else 0.00 end)as insumpo,
--cast( (Insumpo / InSum ) as decimal (20,4)) as sp,
--CAST(incountpo/invcount)as decimal(20,4))as tp
from invoices
group by year(regdate), month(regdate),CONVERT(varchar(3),regdate,100)
The code is not recognizing the commented lines in the above code which is obvious
Could you please help me in the above query.
Thank you