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 2012 Forums
 Transact-SQL (2012)
 select one values into multiple column

Author  Topic 

papershop
Starting Member

27 Posts

Posted - 2013-07-11 : 21:16:57
Dear All

i want to make query for one value into multiple column
example

studentname

roland
emil
koryokun
ekek
sora
jaheanget
sakurashi
taka
tankumi

and show it

roland
emil sora taka
koryokun jaheanget tankumi
ekek sakurashi

can any one give me advice for this?

@papershop

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-07-12 : 00:24:53
how do you get from
this
quote:
roland
emil
koryokun
ekek
sora
jaheanget
sakurashi
taka
tankumi


to that
quote:
roland
emil sora taka
koryokun jaheanget tankumi
ekek sakurashi


what is the logic ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2013-07-12 : 14:41:49
quote:
Originally posted by papershop


can any one give me advice for this?

My advice, is to read these links on how to post your question so we can actually help you:

http://www.sqlservercentral.com/articles/Best+Practices/61537/
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -