Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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'.
Posted

1 solution

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)."
 
Share this answer
 
Comments
upendra shahi 7-May-15 5:01am    
What is in SQL2012?
How to get data in SQL2012
OriginalGriff 7-May-15 5:05am    
Um...
"...Use ROLLUP instead. For more information, see GROUP BY (Transact-SQL)."
upendra shahi 7-May-15 5:07am    
thanx...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900