SQL Server 2016,无效的对象名称“STRING_SPLIT”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47205829/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SQL Server 2016, Invalid object name 'STRING_SPLIT'
提问by Victor Hugo Terceros
In SQL Server 2016 I receive this error with STRING_SPLITfunction
在 SQL Server 2016 中,我使用STRING_SPLIT函数收到此错误
SELECT * FROM STRING_SPLIT('a,b,c',',')
Error:
错误:
Invalid object name 'STRING_SPLIT'.
无效的对象名称“STRING_SPLIT”。
回答by Yahfoufi
Make sure that the database compatibility level is 130
确保数据库兼容级别为130
you can use the following query to change it:
您可以使用以下查询来更改它:
ALTER DATABASE [DatabaseName] SET COMPATIBILITY_LEVEL = 130
回答by Toad
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! :)
我正在使用Split_string
,在英语中感觉语法正确,但我的老眼睛没有看到它应该是STRING_SPLIT
......所以,如果你像我一样有点精神上的挑战,那么检查你是否以正确的方式输入了命令!:)