Functionality such as Split() is for the most of us something we take for granted in whatever programming language we are using.
There is however no Split method in MSSQL. So when I was faced with the problem of splitting strings into multiple rows it got a bit tricky.
I ended up with the function below which will take two arguments, the string to work with, and the separator to split on.
Here is an example of what this code will do: