MsLady
Traumatized by Access
- Local time
- Today, 05:02
- Joined
- Jun 14, 2004
- Messages
- 438
Can anyone help me convert this pivot query to work in sql server please?
I'll love you forever if you help me please
I'll love you forever if you help me please

Code:
TRANSFORM Count(Employees.MaritalStatus) AS MaritalStatusCount
SELECT Employees.MaritalStatus
FROM Employees INNER JOIN Offices ON Employees.OfficeId = Offices.officeId
WHERE ((Not (Employees.MaritalStatus) Is Null))
GROUP BY Employees.MaritalStatus
PIVOT Offices.officeLocation;