Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
28 Feb 2011pankajupadhyay29 2 alternatives
Nice and fast way for reporting
select ExDate, SUM(case when Dept='A' then expense else 0 end)[Store A Expense],SUM(case when Dept='B' then expense else 0 end)[Store B Expense],SUM(case when Dept='C' then expense else 0 end)[Store C Expense]from expenseTable where Dept in ('A','B','C') group by ExDate
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.