When I try this, I don't get the same results.
I ran this query and saved the results:
SELECT *
FROM MyDB.MyTable
ORDER BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Then, I ran this query:
SELECT *
FROM MyDB.MyTable
ORDER BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
SAMPLE 100
When I look at the results of the last query, I don't get the first 100 rows from the first one. I get 100 random rows. Just curious how to actually pull the first rows.
The reason I'm asking is a person on my team was trying to run a large query (700,00 + rows), but was running out of memory when returning the data. Using queryman, we just exported the answer set to a delimited file and it worked fine.
Thanks for the help!