Posted on: 5/7/2014 9:54:09 AM | Views : 347

Hello, everyone,
I met a error when I use framing in the SQL Server 2012 Express. Could you help me, thank you!
the query is:
SELECT custid, orderid, orderdate, val, SUM(val) OVER(PARTITION BY custid ORDER BY orderdate, orderid ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS runningtotal FROM Sales.OrderValues; And the error information is:
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'ROWS'.
Thank you!

Go to the complete details ...