It's hard to answer your question without knowing the table structure that
the query is base on.
Incase there is a field that you can sort by, and that field doesn't repeat
itself (apear only once in the query) you can use something like
SELECT (SELECT Count(*) FROM TableName As C where C.FieldName
<=TableName.FieldName ) AS RecordNum, TableName .*
FROM TableName
ORDER BY TableName.FieldName
Note:
FieldName = Unique value within the query