I am having trouble getting data to pivot in my results
I have three tables
a WIP table, a Staff table, and an Engagement table.
the wip table is timesheet detail and we're trying to a total of how many hours each staff worked on each engagement. i've written the following query which returns the data needed
SELECT TOP 100 E.ClientName AS Client, E.ClientPartner AS Partner, sum(W.WIPHours) AS Hours, S.LastName
FROM tblEngagement E RIGHT JOIN
tblTranWIP AS W ON E.ContIndex = W.ContIndex CROSS JOIN
Staff AS S
GROUP BY E.ClientName, S.LastName, E.clientPartner
Sample Data
WIPTable
staff hours engagement
joe 5 A
steve 10 A
joe 20 B
Desired result
engagement Joe Steve
A 5 10
B 20 0
Our community of experts have been thoroughly vetted for their expertise and industry experience.