Click here to Skip to main content
14,237,418 members
Articles » Database » Database » SQL » Revisions

T-SQL: Most Practical Split Function

Rate this:
5.00 (6 votes)
Please Sign up or sign in to vote.
5.00 (6 votes)
11 Oct 2013CPOL
A SQL String Split function for the real world

Revisions


  

Compare Revision Minor Date Status Editor
23 - publicly available Yes 12-Nov-15 15:11 Available Paul Conrad
Updates in content.
21 No 25-Aug-15 17:16 Available Deeksha Shenoy
Initial creation
20 No 25-Aug-15 14:00 Pending Brad Joss
•25 August 2015: Convert input into TRY_CONVERT to varchar(8000) to avoid a truncation error on [item] values greater than TRY_CONVERT's input max value.
19 No 1-Feb-15 23:21 Available Deeksha Shenoy
Updates in content. Changes: 12
18 No 1-Feb-15 15:48 Pending Brad Joss
Altered download code to default to SQL 2012 version of TRY_CONVERT for item_int column
16 No 6-Jan-15 23:40 Available Deeksha Shenoy
Updates in content. Changes: 12
15 No 6-Jan-15 20:11 Pending Brad Joss
Updates in content. Changes: 1
14 No 16-Mar-14 1:35 Available Deeksha Shenoy
Updates in content. Changes: 1
13 No 15-Mar-14 13:34 Pending Brad Joss
Updates in content. Changes: 16
12 No 11-Oct-13 8:20 Available Smitha Nishant
Updates in content.
11 No 11-Oct-13 7:56 Pending Brad Joss
Added bullet about unit tests
10 No 11-Oct-13 7:50 Pending Brad Joss
Added Explanation of the Code at requset of someone.
9 No 11-Oct-13 3:39 Available Deeksha Shenoy
Updates in content. Changes: 30
7 No 10-Oct-13 22:26 Pending Brad Joss
In this example we are double splitting on two separate delimiters, [tag] and [/tag] (imagine a case for pseudo-XML). Note the white space between the tags is properly trimmed off. While this type o
5 No 10-Oct-13 18:49 Pending Brad Joss
•10 October 2013: Updated to include download link, link was missing.
4 No 10-Oct-13 14:42 Available Smitha Nishant
Updates in content. Changes: 3
3 No 10-Oct-13 11:04 Pending Brad Joss
Another typo, sorry
2 No 10-Oct-13 11:03 Pending Brad Joss
Fixed two type-os, formatted the function call example.
1 No 10-Oct-13 11:00 Pending Brad Joss
Initial creation

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Brad Joss
Software Developer (Senior)
United States United States
No Biography provided

Tagged as

Stats

69.4K views
1.9K downloads
18 bookmarked