I have very simple problem that I can\'t solve. I need to do something like this:
select distinct * from (1, 1, 1, 2, 5, 1, 6).
Anybody can
A technique that has worked for me is to query a table that you know has a large amount of records in it, including just the Row_Number field in your result
Select Top 10000 Row_Number() OVER (Order by fieldintable) As 'recnum' From largetable
will return a result set of 10000 records from 1 to 10000, use this within another query to give you the desired results