We are using SQL server 2012 (service pack 3) and we have recently moved from one server to another. After that we have encountered issue SQL sort order problem. We have many report where the order by clause not present. After the movement, the sort order has been changed and the results in the report became different than the actual.

I know the solution by putting Order by clause in ALL stored procedure and View. Since the number of files are huge, it is there anything we can do in the SQL configuration to resolve the issue?


1 Answer 1


If you don't have an ORDER BY clause, the order of the result set is never guaranteed.

Also, you mentioned "report". If you are using SSRS or any reporting suite really, they have sort functions within them as well which means you wouldn't have to change any of your procedures or views.


Not the answer you're looking for? Browse other questions tagged or ask your own question.