Using Dynamic Values in the PIVOT Operator
I recently worked on a report for a client in which a date input parameter was used to determine the end dates of the previous four calendar quarters. Each time the report ran, it returned data for all four of those quarters. I ended up using PIVOT in the course of the stored procedure for [...]