is there a way to do the above? i found solutions but limited to a single row only and i don't want to do a 'cursor'-like solution, having to iterate. also my requirement is the select includes a where clause something like below:
dateReceived between @startDate and @endDate
and get say, 10 random rows from the result set.
i've tried the order by rand() but having run it a couple of times (in intervals greater than clock ticks) i get the same set of results.
declare @milliSecNow int
set @milliSecNow = datepart(Ms, getdate())
top 100000 *
recv_date between '2007-01-01' AND '2007-12-31'
top 10 firstColumn
drop table #randByDate