Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
609 B

  1. SET QUOTED_IDENTIFIER ON
  2. GO
  3. SET ANSI_NULLS ON
  4. GO
  5. CREATE PROCEDURE sp_NewIssues
  6. @i_DaysOld int
  7. AS
  8. BEGIN
  9. IF @i_DaysOld = 0
  10. BEGIN
  11. SET @i_DaysOld = 1
  12. END
  13. -- Display new buckets
  14. SELECT BucketToInt.BucketId AS Bucket,
  15. MAX(EntryDate)AS NewestEntry
  16. FROM CrashInstances, BucketToInt, BucketToCrash
  17. WHERE DATEDIFF(day,EntryDate,GETDATE()) < @i_DaysOld AND
  18. BucketToCrash.CrashId = CrashInstances.CrashId AND
  19. BucketToCrash.iBucket = BucketToInt.iBucket
  20. GROUP BY BucketId
  21. END
  22. GO
  23. SET QUOTED_IDENTIFIER OFF
  24. GO
  25. SET ANSI_NULLS ON
  26. GO