hi,
i have a table called names and field name
select * from names
name
a
b
c
d

i want to display like this
name
a,b,c,d
how it is possible


Regards
Baiju

Answer Posted / kulwinder

DECLARE @chrString as varchar(200)

select @chrString=@chrString + ',' + Name from Names

? @chrString

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql server replication? : sql server replication

532


How to create user defined functions with parameters?

636


What are the steps you must follow to hide sql server instances?

539


How to use "if ... Else if ... Else ..." Statement structures in ms sql server?

535


What is BCNF? How is it better than 2NF & 3NF?

597






How would we use distinct statement? What is its use?

601


What is @@error in sql?

619


Define left outer join?

579


When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?

495


List the different index configurations possible for a table?

512


what does the automatic recovery do? : Sql server administration

533


Explain what is it unwise to create wide clustered index keys?

542


Explain system functions or built-in functions? What are different types of system functions?

561


Is mysql the same as sql server?

507


What are sp_configure commands and set commands?

562