Hello,
I've written a query to use the Random sequence for 25 rows out of a table, but I would like to know if there is a way to retrieve the actual record or row number as part of the results. I don't have an autonum field in the table. There are about 1.5 million record rows in the dataset.
The query I've written is:
SELECT TOP 25 rnd(docnum) AS RandomSeq, DOCNum, LineItem
From Corporate
ORDER BY Rnd(docnum);
Any help is appreciated.
I've written a query to use the Random sequence for 25 rows out of a table, but I would like to know if there is a way to retrieve the actual record or row number as part of the results. I don't have an autonum field in the table. There are about 1.5 million record rows in the dataset.
The query I've written is:
SELECT TOP 25 rnd(docnum) AS RandomSeq, DOCNum, LineItem
From Corporate
ORDER BY Rnd(docnum);
Any help is appreciated.