2010-10-11 30 views
1
SELECT DateErrored 
FROM  (SELECT Category, ROW_NUMBER (Partition by dateerrored ORDER BY category DESC)AS Row FROM AspErrors) 
      AS LogWithRowNumbers 
WHERE Row >= 1 AND Row <= 10 
+0

'ROW_NUMBER'不是可識別的函數名稱。 – Will 2010-10-11 20:58:57

回答

9

變化ROW_NUMBER變爲ROW_NUMBER() OVER

Link to documentation

+0

是的,這將做到這一點(除非他運行SQL Server 2000) – DForck42 2010-10-11 21:17:23

+0

即時運行SQL Server 2008 – Will 2010-10-12 12:35:15

相關問題