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 matchin
Here is another solution:
You would need to use a temp table to hold the first 50% as below:
select top 50 percent *
into #YourTempTable
from TheTable
-- The below would give the first half
select * from #YourTempTable
-- The below woud give rest of the half
select * from TheTable where TheID not in (select TheID from #YourTempTable)