Home Forums SQL Server 2008 T-SQL (SS2K8) Dynamic Grouping RE: Dynamic Grouping
Gazareth
One Orange Chip
Points: 27737
More actions
January 28, 2013 at 5:30 am
#1581565
Your CASE statements need to match in the select & group by clauses - you have @Level = 6 in the select, and @Level < 6 in the group by.