With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!
SELECT * FROM ( SELECT PB.CustomerCode, dbo.CcYyMmmmFromPeriod(PB.Period) AS Period, SterlingPayments FROM Customers CU INNER JOIN PeriodBanks PB ON CU.CustomerCode = PB.CustomerCode WHERE ISNULL(CU.ShortName, '') <> 'CLOSED' AND PB.Period >= ((DATEPART(year, GetDate()) - 1900) * 12 + DATEPART(month, GetDate())) - 24 ) Data PIVOT ( SUM(Data.SterlingPayments) FOR Data.Period IN ([May 2009], [April 2009], [March 2009]) ) Pivotted ORDER BY Pivotted.CustomerCode ASC
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.