Link to home
Start Free TrialLog in
Avatar of jcorbin
jcorbin

asked on

PIVOT Equiv in T-SQL??

Is there a comparable function to Access's PIVOT?? I would like to sum all
the records by employee location by Job Title, where i'd be doing a group by Job Title and pivot on Location;


JobTitle    LocationA    LocationB    LocationC    Total
Job01            22          22           33         77
Job02            11          10           10         31

etc....


ANy help is appreciated greatly..................


John
jcorbin@apci.net

Avatar of Victor Spiridonov
Victor Spiridonov
Flag of Russian Federation image

This fature dosn't exist in SQL server, the easiest way is to attach the  table in Access and use it's function
ASKER CERTIFIED SOLUTION
Avatar of cymbolic
cymbolic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of djcunning
djcunning

A useful procedure for doing this in T-SQL (Microsoft SQL Server) is given on this web page:

http://www.sqlteam.com/item.asp?ItemID=2955