SQLTeam.com | Weblogs | Forums

Split the name and put into rows


#1

Hi all,

I want to split the name and put the same in rows, as shown below

KUMAR RAHUL SANU

KUMAR
RAHUL
SANU

can somebody share the sql code to achieve the this.

Thanks all


#2

Here is an article that contains lots of methods to split a function in T-SQL. https://sqlperformance.com/2012/07/t-sql-queries/split-strings


#3

Use Jeff Moden's String Splitter function

http://www.sqlservercentral.com/articles/Tally+Table/72993/