troubleshooting Question

How to get CrossTab Table to work in ASP.Net?

Avatar of Denisdh
DenisdhFlag for Ireland asked on
Microsoft AccessASP.NETSQL
13 Comments1 Solution356 ViewsLast Modified:
I'm a bit of an SQL novice. What I have and want is:

Property_Agent, Property_Location
James Joyce, Dublin
Harrot Ford, Dublin
Harrot Ford, Dublin
James Joyce, Dublin
James Joyce, Dublin
James Joyce, Offaly
Harrot Ford, Offaly
Harrot Ford, Offaly
James Joyce, Offaly
James Joyce, Offaly
James Joyce, Offaly

I want to display a CrossTab like;

Property_Agent, Dublin, Offaly
James Joyce, 3, 4
Harrot Ford, 2, 2

I currently have a working version in MS Access but cant pull it into my ASP.Net Website as the TRANSFORM call isnt recognised in MSSQL. The query is attached.

TRANSFORM Count(tblReportData.ID) AS CountOfID
SELECT tblReportData.Agent, Count(tblReportData.ID) AS [Total Of ID]
FROM tblReportData
GROUP BY tblReportData.Agent
PIVOT tblReportData.County;
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros