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)
 SQL query result show horizontally

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-03 : 08:34:42
pragnesh writes "when i run select <colon_name> from tablename
i got results which are show as new line for each record i want to see the records
as tab delimated or any another character"

Teroman
Posting Yak Master

115 Posts

Posted - 2001-12-03 : 08:53:03
try this, for comma delimited, but you get the idea

declare @string varchar(4000)
declare @delim char(1)
set @delim = ','

select @string = isnull(@string+@delim,'') + column
from table

select @string

you will need some convert() s on the column if it is a number not a character

eg

select @string = isnull(@string+@delim,'') + convert(varchar(10),column)
from table

instead

hope thats what you're after

col

Go to Top of Page
   

- Advertisement -