{"issue":{"state":"closed","pull_request":{"diff_url":"https://github.com/jeremyevans/sequel/pull/393.diff","html_url":"https://github.com/jeremyevans/sequel/pull/393","patch_url":"https://github.com/jeremyevans/sequel/pull/393.patch"},"user":{"avatar_url":"https://secure.gravatar.com/avatar/a82409021ddf415a8027872b889c5f74?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a82409021ddf415a8027872b889c5f74","url":"https://api.github.com/users/jfirebaugh","login":"jfirebaugh","id":98601},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-03T20:28:43Z","closed_at":"2011-11-03T20:28:17Z","comments":1,"url":"https://api.github.com/repos/jeremyevans/sequel/issues/393","body":"MSSQL does not guarantee ordering of a result set that uses\r\nROW_NUMBER unless you explicitly order it.\r\n\r\n\"These ORDER BY clauses do not determine the order that rows will\r\nbe returned from the query.  To guarantee absolutely a certain\r\noutput order from the query, you must add an explicit query-level\r\nORDER BY clause\" - http://blogs.msdn.com/b/craigfr/archive/2008/03/19/ranking-functions-row-number.aspx\r\n\r\nI haven't found it documented for Oracle or DB2, but I wouldn't be\r\nsurprised if they behave the same.","html_url":"https://github.com/jeremyevans/sequel/issues/393","number":393,"title":"Explicitly order by the row number column when using ROW_NUMBER","id":2135895,"created_at":"2011-11-03T18:34:57Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/f183bcc4176b308c9edabe79299e448f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f183bcc4176b308c9edabe79299e448f","url":"https://api.github.com/users/jeremyevans","login":"jeremyevans","id":3846},"updated_at":"2011-11-03T20:28:43Z","url":"https://api.github.com/repos/jeremyevans/sequel/issues/comments/2622622","body":"No fallout on MSSQL, DB2, or Oracle, so I merged this.  Thanks for the patch!","id":2622622,"created_at":"2011-11-03T20:28:43Z"}}