SQL create a delimited string from a flat file

2018-05-07T18:34:42+00:00February 24th, 2015|SQL|

I’ve recently written 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. Fortunately creating a delimited string is far simpler than splitting a delimited string. Assuming we have a flat table called CountryUsers with the following structure: [...]

SQL split string by a delimiter to create new rows

2015-02-04T21:07:40+00:00February 4th, 2015|SQL|

I’ve just spent a reasonable amount of time digging through the internet to work out how to take a dataset containing a delimited string and then split the string to create 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 to do is split [...]