SQL STRING_AGG 不是可识别的内置函数名称

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40923080/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 05:01:05  来源:igfitidea点击:

STRING_AGG is not a recognized built-in function name

sqlsql-serversql-server-2016

提问by Luke101

I've downloaded and installed SQL Server 2016. When I attempted to use the STRING_AGGfunction I receive this error. Here is my code:

我已经下载并安装了 SQL Server 2016。当我尝试使用该STRING_AGG功能时,我收到了这个错误。这是我的代码:

SELECT STRING_AGG(cast(FieldNumber AS VARCHAR(100)), ',')
FROM Fields

I've installed SQL Server 2016 and SP1. Is there anything else I need to do. Here is the feature I am trying to use. String Agg

我已经安装了 SQL Server 2016 和 SP1。还有什么我需要做的吗。这是我尝试使用的功能。字符串聚合

回答by P?????

STRING_AGGis not introduced in SQL SERVER 2016.

STRING_AGG中没有介绍SQL SERVER 2016

It is introduced in SQL SERVER vNext. In the MSDN linkyou have provided it is mentioned THIS TOPIC APPLIES TO : SQL Server (starting with vNext)not SQL SERVER 2016. It is a much needed feature I wish they add it in any future releases

它是在SQL SERVER vNext. 在您提供的 MSDN链接中,提到了本主题适用于:SQL Server(从 vNext 开始)不是SQL SERVER 2016。这是一个非常需要的功能,我希望他们在未来的任何版本中添加它

In case you are wondering what is vNext

如果您想知道什么是 vNext

SQL Server vNext represents a major step towards making SQL Server a platform that enables choices of development languages, data types, on-premises and in the cloud, and across operating systems by bringing the power of SQL Server to Linux, Linux-based Docker containers, and Windows. SQL Server vNext also includes the features added in SQL Server 2016 service packs

SQL Server vNext 代表着使 SQL Server 成为一个平台的重要一步,该平台通过将 SQL Server 的强大功能引入 Linux、基于 Linux 的 Docker 容器,支持选择开发语言、数据类型、本地和云中以及跨操作系统, 和 Windows。SQL Server vNext 还包括 SQL Server 2016 服务包中添加的功能

For more info check here

欲了解更多信息,请查看此处

回答by Ganesh Shankar Dixit

You might have multiple SQL server instances installed for various SQL versions. Go to the Services and start the service for newly installed SQL server version instance.

您可能为各种 SQL 版本安装了多个 SQL 服务器实例。转到服务并为新安装的 SQL 服务器版本实例启动服务。

Then connect that instance with your SQL server management studio.

然后将该实例与您的 SQL 服务器管理工​​作室连接。