Stored Procedure to Split String in SQL

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Stored Procedure to Split String in SQL

Unfortunately there is no split() function in Sybase or SQL Server to split string based upon any delimiter. You need to use methods like PATINDEX ,CH
http://javarevisited.blogspot.com/2012/12/charindex-padindex-sybase-sqlserver-eample-split...
  • Total Hits: 11878

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 178 votes

  • Category: MsSQL/Stored Procedures

  • Submitted on: 2013-11-21 08:28:13

  • Submitted By: Javin Paul

  • Set as Favorite

Description:

Unfortunately there is no split() function in Sybase or SQL Server to split string based upon any delimiter. You need to use methods like PATINDEX ,CHARINDEX ,LEFT etc to split String. This article shows example of stored procedure to splitting comma separate string.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 45.51%  81
 Two starsTwo star  Vote LeftVote MiddleVote Right 8.43%  15
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 10.67%  19
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 8.99%  16
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 26.4%  47

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements