↧
Answer by ThomasRushton
I would suggest you look at the [PIVOT][1] statement, as this sort of thing is what it's there for, Here's an example of how it might look for you: First off, we set up a temporary table variable to...
View ArticleAnswer by Mrs_Fatherjack
Sorry I'm on SQL 2000 so don't have the joy of PIVOT, this does give you what was asked for, it's just a bit long winded. this works: SELECT accountid, SUM(CR) AS [Credit], SUM(DR) AS [Debit],...
View Article