How do I handle a query where both the rows and the columns are dynamic? For instance, say I have a set of projects, each of which is being executed by one or more vendors over some time frame. For any given project, I want to write a report that shows their Planned and Actual hours over time. So, for project A, I might need to show the following columns: Month, Vendor 1 plannedhours, Vendor 1 actualhours. But for project B, I might need to show Month, Vendor 1 plannedhours, Vendor 1 actualhours, Vendor 2 plannedhours, Vendor 2 actualhours, etc.. The number of vendors is completely variable for a given project, as is the time frame (the system tracks many projects over multiple years). The underying data tables currently look like this: PlannedResources- projectID int, vendorID int, description varchar, qtyhours decimal, assignmentstart datetime, assignmentend datetime ActualCosts- projectID int, vendorID int, description varchar, qtyhours decimal, chargedate datetime If anyone has any thoughts on how to approach this problem I would love to hear about it. I've been forced to come up with ugly workarounds for a few years now and would like to try and handle this in a single, efficient stored procedure if possible. Thanks in advance!