Viewing 5 posts - 1 through 5 (of 5 total)
Luis Cazares (3/14/2014)
March 14, 2014 at 11:26 am
Eugene Elutin (3/11/2014)
declare @dtFrom date
declare @dtTo date
select @dtFrom = '2013-12-15'
,@dtTo = '2014-02-18'
select year(dt) [Year], month(dt) [Month], count(*)
from...
March 14, 2014 at 6:52 am
Solved like this:
SELECT
fc.no, fc.nome,
'FANO1' = SUM(Case When year(datalc)=2010 Then fc.ecred Else 0 End),
'Dif' = SUM(Case When year(datalc)=2010 Then fc.ecred Else 0 End)-SUM(Case When year(datalc)=2009 Then fc.ecred Else 0 End)
FROM
fc(nolock) left...
July 22, 2010 at 12:03 pm
That helped alot, but i don't quite have what i need. I forgot to mention, i do have other two columns which are relevant, so i made it like this:
WITH...
July 20, 2010 at 7:29 am
No, none at all.
I mean, they actually are the same columns repeated, but as the data will be different (cause of different conditions) i intend to name them differently.
July 20, 2010 at 5:02 am
Viewing 5 posts - 1 through 5 (of 5 total)