Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
Group   RefNo   UPDATE  UPTIME
A   A001    20120420    14:10
A   A001    20120410    13:12
A   A001    20120419    14:08
B   B001    20120525    16:06
B   B001    20120525    17:04


Hi, i have data like above and just want to see it in this form..

SQL
Group   RefNo   UPDATE1 UPDATE2 UPDATE3
A   A001    20120410    20120419    20120420
B   B001    20120525    20120525    NA


kindly anyone help me out..
Posted

1 solution

Try using PIVOT - UNPIVOT
Using PIVOT and UNPIVOT[^]
Pivoting data in SQL Server[^](Alternate ways)
 
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