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)
 Transpose Rows to columns

Author  Topic 

sathiesh2005
Yak Posting Veteran

85 Posts

Posted - 2010-03-26 : 00:54:52
Hi All,

How can i transpose rows into columns?
Anyone please help.

Example:
Short_Desc
----------
Mass Media
Meets
Merchandize
Mirror & Interiors
Miscellaneous

to

Mass Media Meets Merchandize Mirror & Interiors Miscellaneous
---------- ----- ----------- ------------------ -------------

Thanks in advance.



Regards,
Sathieshkumar. R

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-26 : 01:42:08
what is the primary key of that table ?


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

Go to Top of Page

sathiesh2005
Yak Posting Veteran

85 Posts

Posted - 2010-03-26 : 03:31:09
quote:
Originally posted by khtan

what is the primary key of that table ?


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





Primary key is ITEM_Code.
ITEM_Code Short_Desc
--------- ----------
GE001 Mass Media
GE003 Meets
GE004 Merchandize
GE005 Mirror & Interiors
GE010 Miscellaneous

I want to transpose it into columns.
I need only the Short_desc

Thanks for the reply.


Regards,
Sathieshkumar. R
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-26 : 04:04:21
you only have 1 or more than 1 Mass Media record ?


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

Go to Top of Page
   

- Advertisement -