Answer the question
In order to leave comments, you need to log in
What request to execute?
I have a table, I'm doing pagination for the site.
The last entry of the first "page" has EventID = 221316137
What query should be made to continue after the last EventID?
SELECT * FROM (
SELECT
[Time] as [Timestamp],
[EventID],
DATEADD(MINUTE, ABS(TimeBias), CAST(([Time] / 864000000000.0 - 109207) AS DATETIME)) as [Date],
ROW_NUMBER() OVER (ORDER BY Time desc) AS RowNum
FROM [emsevents].[dbo].[Events] WHERE Time <= 132643456785317000 AND Time >= 132643456770758000
) AS result WHERE result.RowNum BETWEEN 1 AND 50
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question