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 / soorai ganesh
Hi Friend,
If u use SQLSERVER 2005 u can try like this............
CREATE TABLE EMP ( ENAME VARCHAR(25))
INSERT INTO EMP VALUES('Ganesh')
INSERT INTO EMP VALUES('Narendra')
INSERT INTO EMP VALUES('Rinku')
INSERT INTO EMP VALUES('Selvam')
INSERT INTO EMP VALUES('Kirti')
SELECT REPLACE(REPLACE(
( SELECT ENAME AS EmpName FROM EMP FOR XML PATH ('') ) ,'<EmpName>',''),'</EmpName>',',')
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
how to do partition in sqlserver
What are the High-Availability solutions in SQL Server and differentiate them briefly?
What is change data capture (cdc) feature?
Please illustrate physical database architecture? : SQL Server Architecture
How to backup encryption key ?
What functions can a view be used to performed?
What are the database roles? : sql server security
What is a ddl statement?
What is the osql utility?
What are the characteristics of modern DBMS?
What is bit data type?
What are the options which must be set to allow the usage of optimistic models?
What is cached report?
Any one plz send me SQL Server Developer/DBA resume for 4 years experience
Which is the latest version of sql server and when it is released?