Viewing 3 posts - 31 through 33 (of 33 total)
select COLUMN1, COLUMN2,
sum(case when COLUMN3 =N'P' then COLUMN4 end) as [P],
sum(case when COLUMN3 =N'Q' then COLUMN4 end) as
,
sum(case...
May 14, 2009 at 1:24 am
#994296
Hi,
There are good articles by Jeff Moden on this subject
http://www.sqlservercentral.com/articles/T-SQL/63681/[/url]
and second part
http://www.sqlservercentral.com/articles/cross+tab/65048/[/url]
Kupy
December 17, 2008 at 12:53 am
#913643
As far as I know, the first choice should be the one for 2 reasons
1. The first condition give less records
2. Numeric field is quicker then varchar field
July 31, 2008 at 12:51 am
#851012