SQL Server 2016, Invalid object name 'STRING_SPLIT'

半城伤御伤魂 提交于 2019-12-21 03:17:40

问题


In SQL Server 2016 I receive this error with STRING_SPLIT function

SELECT * FROM STRING_SPLIT('a,b,c',',')

Error:

Invalid object name 'STRING_SPLIT'.


回答1:


Make sure that the database compatibility level is 130

you can use the following query to change it:

ALTER DATABASE [DatabaseName] SET COMPATIBILITY_LEVEL = 130



回答2:


I was using Split_string, which felt grammatically correct in English, but my old eyes didn't see that it should be STRING_SPLIT ... so, if you're a bit mentally challenged like me, then check you've typed the command the right way! :)



来源:https://stackoverflow.com/questions/47205829/sql-server-2016-invalid-object-name-string-split

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!