Search code examples
azure-sql-database

'STRING_SPLIT' is not a recognized built-in function name


The new STRING_SPLIT method is not available in my Azure SQL database. I had already ran ALTER DATABASE [DatabaseName] SET COMPATIBILITY_LEVEL = 130 a couple days ago, and I have verified the compatibility level is indeed set to 130. SELECT database_id, name, compatibility_level FROM sys.databases

Has anyone else been able to use the new method, and if so, did you need to do anything else to get it working?


Solution

  • It was a syntax error. I was attempting to use the function as scalar and not as table valued.

    Correct Syntax: SELECT Value FROM STRING_SPLIT('Lorem ipsum dolor sit amet.', ' ');