Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by M. Choirul Amri SQL Server 2005 for SQL2k Developer (Part 1)? RE: SQL Server 2005 for SQL2k Developer (Part 1)?
Muhammad Choirul Amri
SSC Veteran
Points: 207
More actions
March 29, 2006 at 10:31 pm
#629714
Hi Paul,
thanks for the correction of the typo.
The query still works fine, but order year 2001 will be interpreted as 2002 .
It should be like this:
SUM(CASE when OrderYear = 2002 then SubTotal ELSE 0 end) as '2002',