MsLady
Traumatized by Access
- Local time
- Today, 08:49
- Joined
- Jun 14, 2004
- Messages
- 438
Okay! I've had it! Why is crosstab query a nightmare in sql server
This is absolutely ridiculous and i can't imagine why they left the feature out
Seeing as this is just a piece of cake in Access and it will run smoothly without pulling teeth but i am made to understand (by the powers that be) that i have to do some karate with sqlserver to get the same results. imagine that. If any sweet somebody can figure it out, please show me how!
Thank you.
This is absolutely ridiculous and i can't imagine why they left the feature out
Seeing as this is just a piece of cake in Access and it will run smoothly without pulling teeth but i am made to understand (by the powers that be) that i have to do some karate with sqlserver to get the same results. imagine that. If any sweet somebody can figure it out, please show me how!
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;