The STRING_SPLIT function is only available under compatibility level 130. If the database compatibility level is below 130, SQL Server will not be able to find and execute the STRING_SPLIT function. You can change the database compatibility level using the following command:
ALTER DATABASE DatabaseName SET COMPATIBILITY_LEVEL = 130
Note that compatibility level 120 may be the default, even on new Azure SQL databases.
For reference:
Version - Highest Compatibility Level - Lowest Available Level
- SQL 2017 - 140 - 100
- SQL 2016 - 130 - 100
- SQL 2014 - 120 - 100
- SQL 2012 - 110 - 90
- SQL 2008 - 100 - 80
- SQL 2005 - 90 - 80
- SQL 2000 - 80 - 80
source share