此查询在SQL2012中出错 [英] This query gives error in SQL2012

查看:84
本文介绍了此查询在SQL2012中出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SQL2012中SELECT * FROM产品COMPUTE MAX(Qty)抛出错误





错误是:



消息156,等级15,状态1,行1

关键字'COMPUTE'附近的语法不正确。

SELECT * FROM Product COMPUTE MAX(Qty) in SQL2012 throw error


Error is :

Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'COMPUTE'.

推荐答案

请参阅此处: https://technet.microsoft.com/ en-us / library / ms181708(v = sql.105).aspx [ ^ ]

它正在谈论SQL Server 2008 R2并且非常明确:

重要说明:

此功能将在下一版本的Microsoft SQL Server中删除。请勿在新的开发工作中使用此功能,并尽快修改当前使用此功能的应用程序可能。请改用ROLLUP。有关更多信息,请参阅GROUP BY(Transact-SQL)。
See here: https://technet.microsoft.com/en-us/library/ms181708(v=sql.105).aspx[^]
It is talking about SQL Server 2008 R2 and is very explicit:
"Important note:
This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. Use ROLLUP instead. For more information, see GROUP BY (Transact-SQL)."


这篇关于此查询在SQL2012中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆