How can show the rows of a table as columns in a new table
Suppose my Table is Like
tbl1
********
Sl# Name
1 A
2 B
3 C
4 D
I Want to Return it as
tbl2
*******
Sl# A B C D
1 0 0 0 0
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is called
Data Transposition. A search would give you some samples on how to do that.Few pointers :
http://www.eggheadcafe.com/tutorials/aspnet/5c5d810e-20e6-4d6c-a0a3-5277ba8de7e7/transpose-a-datatable-in.aspx
http://www.codeproject.com/KB/database/TransposeTable.aspx