Post navigation

MS SQL Server List to Table Function

I need this for work real quick, and hopefully I’ll get some time to update the content later on.

This User Defined Function will turn a comma separated list (or any single character, for that matter), and turn it into a table so you can join on it. My recommendation is to shove it into a table variable first, rather than join on the function. It may be an old wives tale, but I’d rather do it this way once, than go through all of the procedures that use it to extract it out 🙂

RJ writes custom Windows and Web applications using the Microsoft .NET framework, and enjoys solving problems with code, often while listening to a techno soundcloud stream. He hopes to one day write an application that many businesses will use.