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)
 How to display column as a row

Author  Topic 

kmmchan
Starting Member

5 Posts

Posted - 2006-03-07 : 04:23:40
Hi

I am using SQL Server 2000
create table Fac(facility varchar(25))
Insert into Fac Values('A')
Insert into Fac Values('B')
Insert into Fac Values('C')
Insert into Fac Values('D')

I want to display all the records in Fac table as the format below
Fac
==============
'A','B','C','D'


thanks in advance
-k

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-03-07 : 04:31:04
see here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&searchterms=Combine%20values%20from%20rows%20into%20a%20column

----------------------------------
'KH'


Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-07 : 05:52:57
Note that if the combined string exceeds 8000 characters, you need to use more variables. Where do you want to show these data?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-03-07 : 05:55:05
can look at the following link

http://www.sqlteam.com/item.asp?ItemID=2955

Sucess Comes to those who Believe in Beauty of their Dream..
Go to Top of Page
   

- Advertisement -