Guest User

SOF 11127524

a guest
Sep 10th, 2015
127
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DECLARE @x TABLE(value INT, [time] DATETIME, ID INT)
  2.  
  3. INSERT @x VALUES
  4. (0,'20120615 8:03:43 PM',11),--
  5. (1,'20120615 8:03:43 PM',11),--*
  6. (1,'20120615 8:03:48 PM',11),--
  7. (1,'20120615 8:03:53 PM',12),--
  8. (1,'20120615 8:03:58 PM',12),--
  9. (2,'20120615 8:04:03 PM',11),--*
  10. (2,'20120615 8:04:08 PM',11),--
  11. (3,'20120615 8:04:13 PM',11),--*
  12. (3,'20120615 8:04:18 PM',12),--
  13. (3,'20120615 8:04:23 PM',11),--
  14. (2,'20120615 8:04:28 PM',12),--*
  15. (2,'20120615 8:04:33 PM',11);
  16.  
  17. -- output ordered by ID
  18. 0,'20120615 8:03:43 PM',11
  19. 1,'20120615 8:03:43 PM',11
  20. 2,'20120615 8:04:03 PM',11
  21. 3,'20120615 8:04:13 PM',11
  22. 2,'20120615 8:04:33 PM',11
  23. 1,'20120615 8:03:53 PM',12
  24. 3,'20120615 8:04:18 PM',12
  25. 2,'20120615 8:04:28 PM',12
RAW Paste Data