Click here to Skip to main content
15,914,924 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Database structure is as follow:

Status dat count
Cancel 2010-11-06 [20]
Complete 2010-12-06 [30]

I want to show the above data in gridview like below structure

Status Cancel Complete
2010-11-06 [20] -
2010-12-06 - [30]

If anyone has an idea of how to implement this, then please share.

Thanks
Posted

1 solution

You could use a pivot table if you're using a SQL Server.

http://www.kodyaz.com/articles/t-sql-pivot-tables-in-sql-server-tutorial-with-examples.aspx[^]
 
Share this answer
 
Comments
Sushma_Patel 22-Jun-10 4:36am    
Thanks for sharing just a wonderful article.

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