Skip to main content



Using STRING_SPLIT with more than one character separator

Okay, a quick tip today on how to use STRING_SPLIT in SQL Server with more than one character separator.

STRING_SPLIT is pretty cool.  Back before the latest SQL Server release frenzy that's leaving our heads spinning, it was necessary to write sometimes complex procedures to split strings that contained commas or other separators into their various components.

Why?  The first rule of normalisation - 1NF - is why.  It states that values should be atomic, i.e. only breakable into one component value within the context of the datum.

What does this mean?  Surely then, a date, like '2008-01-01', is not in 1NF since it can be broken down into day, month and year - and thereafter into individual numerals?  This is a flawed argument for two reasons - the first is that a full date like this is correct to context, i.e. breaking down the date would detract from the value of the whole data point.  Secondly, dates are stored internally in a different format to the one shown anyway!


Latest posts

Connecting to named instances without using the instance name

Transaction log backup problems

A day in the life...

Automatic F5'er

Fun with Azure DB

Welcome to