SQL create a delimited string from a flat file

2020-03-04T21:21:31+00:00February 24th, 2015|SQL|

Recently I wrote a post on how to split a delimited string in SQL. Now I need to do the reverse and take the flat table and create a delimited string in SQL. Fortunately creating a delimited string in SQL is far simpler than splitting a delimited string. Assuming we have a flat table called CountryUsers [...]

SQL split string by a delimiter to create new rows

2020-03-05T10:12:23+00:00February 4th, 2015|SQL|

Ever need to split a delimited string in SQL, creating new records? For example you could have a table called Users: Country User UK Bob|Fred|Bill USA Mike|Lou|Carol|Sam What you want is to split the string by the delimiter and create new rows: Country User UK Bob UK Fred UK Bill USA Mike USA Lou USA [...]