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
 Transact-SQL (2000)
 SQL Server Transpose

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-05-07 : 11:29:37
cristi writes "Hello,

I am looking to do a transpose operation on a SQL Server table.

Source:

Table1
F1 F2 F3 Date
R1 v11 v12 v13 Date1
R2 v21 v22 v23 Date2
R3 v31 v32 v33 Date3

The result that I want is:

Date1 Date2 Date3
F1 v11 v21 v31
F2 v12 v22 v32
F3 v13 v23 v33

Is there any way I can do this (inclusding cursors)?

Any help would be greatly appreciated."

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-05-07 : 11:32:16
hi!

look up cross joins or pivot tables on the main page -> Search.



Go with the flow & have fun! Else fight the flow :)
Go to Top of Page
   

- Advertisement -