Can't execute a COMPUTE statement

I am trying to execute this simple statement on Northwind database

USE Northwind
SELECT  productid, orderid,quantity 
FROM [order details]
ORDER BY productid, orderid
COMPUTE SUM(quantity)
GO

But I this can't execute , I got this error

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

Answers


The COMPUTE clause is no longer supported in SQL Server 2012. The documentation suggests using ROLLUP instead.


Need Your Help

.encode('utf-8') printing strange characters

python utf-8

I have some text in the form of a python string that represent foreign names: