Is there a way to split the results of a select query into two equal halfs?
I need a solution for a select query in Sql Server 2005. I'd like to have a query returning two ResultSets each of which holding exactly half of all records matching a certain criteria. I tried using TOP 50 PERCENT in conjunction with an Order By but if the number of records in the table is odd, one record will show up in both resultset...