What is SQLServer's equivalence of TRANSFORM,PIVOT

If you have a table called EMPLOYEES in ACCESS you can run a TRANSFORM,PIVOT command

as show bellow. What is the equivalence of the same command in SQLServer.



EMPLOYEES

Title Country

Sales Representative USA

Vice President, Sales USA

Sales Representative USA

Sales Representative USA

Sales Manager UK

Sales Representative UK

Sales Representative UK

Inside Sales Coordinator USA

Sales Representative UK





transform count(*) select Title from EMPLOYEES group by Title pivot Country



Title UK USA

Inside Sales Coordinator 1

Sales Manager 1

Sales Representative 3 3

Vice President, Sales 1




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories