[Solved] SQL SERVER (Error Message) : Invalid object name 'string_split'. - ASPMANTRA | Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server AND WCF snippets and tutorial

[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'.




What do you think about this article?

If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.
Latest


EmoticonEmoticon