Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is the table i have....
Op_date    Dept Name     Major    Miner
5/20/2014  NEUROSURGERY  0        1
5/20/2014  UROLOGY       0        1
5/21/2014  ORTHOPEDICS   1        0
5/23/2014  UROLOGY       1        0

But i want to doing like this..

Op_date    NEUROSURGERY       UROLOGY          ORTHOPEDICS  
           Major    Miner     Major    Miner   Major    Miner
5/20/2014  0        1         0        1       0        0
5/21/2014  0        0         0        0       1        0
5/23/2014  0        0         1        0       0        0


How we can doing this with PIVOT or other concept....
Posted
Updated 26-May-14 19:57pm
v3

1 solution

This article may be useful Pivot two or more columns in SQL Server 2005[^]. The same methodology works in later versions of SQL Server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900