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
 General SQL Server Forums
 New to SQL Server Programming
 Single row output

Author  Topic 

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-04-24 : 06:29:39
Hi
i hav a query as

select skill_id from o_skills where employee_id=78

Output of the above query is:

skill_id
-----------
5
13
3


But i want output as


skill_id
--------
5,13,3


how can i get the above result
Thanks in Advance


Malathi Rao

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-24 : 06:31:13
see http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx


KH

Go to Top of Page

craig79
Starting Member

33 Posts

Posted - 2007-04-30 : 04:28:55
Will this do????


select convert (varchar,skill_id )+ ',' from dbo.o_skills
where employee_id=78
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-30 : 04:41:58
[url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53293[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-30 : 04:42:15
Are you using SQL Server 2005?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254

Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -