Saturday, January 18, 2020

[Solved] SQL SERVER (Error Message) : Invalid object name 'string_split'.



[Solved] SQL SERVER (Error Message) : Invalid object name 'string_split'.


Error :
string_splitis new built-in table value function introduced in SQL SERVER 2016. When we upgrade the Sql server current version (SQL SERVER 2014) to latest version (SQL SERVER 2016 or higher) and start using this function getting error:

Invalid object name 'string_split'.

Solution:
 Reason of this error is database compatibility level.  To use this function database compatibility level should be at least 130. So if you want to use this function, change the compatibility level to SQL SERVER 2016 or higher version.

Run the below given query to change compatibility level of database:

ALTER DATABASE [Aspmantra]
SET COMPATIBILITY_LEVEL = 130
go

[Solved] SQL SERVER (Error Message) : Invalid object name 'string_split'.

For SQL SERVER 2017 compatibility level should be 140.

Now run the query/script with string_split function. This will run successfully.


[Solved] SQL SERVER (Error Message) : Invalid object name 'string_split'.




No comments:

Post a Comment