how to convert row into colun in sql server ?
how to convert row into colun in sql server ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Apr 11, 2013, 11:45 PM
hi,
it depend upon your requirement.
you just want to convert whatever row you have in to column or you want to perform some aggregate option on row while converting to column.
you can use pivot query in the second case.
http://msdn.microsoft.com/en-in/library/ms177410%28v=sql.105%29.aspx
http://blogs.msdn.com/b/spike/archive/2009/03/03/pivot-tables-in-sql-server-a-simple-sample.aspx
hope this will help you.
Javeed M ShaikhPosted Apr 11, 2013, 3:15 PM
Please refer to this article:
http://www.c-sharpcorner.com/UploadFile/suthish_nair/convert-rows-to-columns-in-sql-server-20082005/