Another one for you SQL Server gurus…
I have a table like so…
AccountManager | Action | Count
-----------------------------------------------------
Joe | Client Negotiation | 10
Bloggs | Closing | 1
Aunty | Email | 12
Marie | Preparing Contract | 32
The Action column may have numerous different types of statuses which may not necessarily be fixed.
I need the output to be the following:
AccountManager | Client Negotiation | Closing | Email | Preparing Contract
--------------------------------------------------------------------------
Joe | 10 | 0 | 0 | 0
Bloggs | 0 | 1 | 0 | 0
Aunty | 0 | 0 | 12 | 0
Marie | 0 | 0 | 0 | 32
How could this be achieved? Help!
Follow the below walkthrough
http://www.tsqltutorials.com/pivot.php