Msg 195: STRING_SPLIT is not a recognized built-in function name
Yesterday, I was writing some Transact SQL to dust off the cobwebs. I got confused when I was playing around with the STRING_SPLIT function, and kept getting the error:
Msg 195, Level 15, State 10, Line 2 ‘STRING_SPLIT’ is not a recognized built-in function name.
I checked my database compatibility level, which must be 130 or higher for the function to be available. My database compatibility level was 160, so that was fine.
The issue? STRING_SPLIT is a table valued function. If your syntax uses it as a scalar function, you will still see a message that it doesn’t exist – but really the issue is that the function exists, but needs to be called with a different syntax.
Let’s look at some examples.