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)
 table transpose in query analyzer 2000

Author  Topic 

jeff06
Posting Yak Master

166 Posts

Posted - 2007-11-20 : 08:46:43
My table also have a id colume, thanks
The sql ret is in t1.
id date col1 col2
1 11/1/07 2 3
2 11/2/07
3 11/5/07
4 11/6/07
5 11/7/07
6 11/8/07
7 11/9/07
8 11/12/07
----
20 11/19/07

I want tranpose it to t2
id 1 2 3 4 5 6 7 ---------------- 20
date 11/1/07 11/2/07 11/5/07 11/6/07 11/7/07 11/8/07 11/9/07-11/12/07
Q1 2
Q2 3

How can i do that?
I do not have right to create a procedure
Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-11-20 : 09:06:12
Do you have to do this in SQL Server ? Presentation and formatting of the data should be done at the front end


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -