Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Transposing data

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-05-27 : 11:15:34
Hari writes "I have a table with following data, and would like to transpose it to another table..any ideas or do you have a store procedure to do this, I will pass the date..


Table1

Name salary date
=========================================
Hari 100 01/01/2001
John 55 01/01/2001
Mike 22 01/01/2001
Jack 102 01/01/2001



Traspose data should look like this...

Table2

Col1 Col2 Col3 Col4 col ..n...
==============================================================
Hari John Mike Jack nn..
100 55 22 102
01/012001 01/012001 01/012001 01/012001


I am using MS-SQL server 7.
Many thanks for you help.
H"
   

- Advertisement -