I have a table that looks something like this:
pageload
--pageloadid (autoincrementing numeric id field)
--BeginDateTime
Now I’d like to show all records and show the time elapsed between every record. I can add another field to my table to store an EndDateTime if necessary but I’m guessing there is some simple way to do this in SQL that I’m just not thinking of.
I’m currently using MS Access but the solution you suggest should be database agnostic, if possible.
This is not possible to create database-agnostic query in this case:
However this query will work in both MS Access and MS SQL Server:
The query will show the diff time in seconds between two adjacent rows (if ordered by
pageloadid).I suggest you adding
EndDateTimeas this will simplify and expedite the query significantly.