Siegfried
Let Access write it for you.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13997
Open a new query in design mode. Add the table that contains these
fields/columns.
Add the dtCompleted field to the "grid". In the criterion row below
dtCompleted, add a selection criterion something like:
Add a calculated field to the grid, something like:
ExecutionTime: DateDiff("h",[dtStart],[dtCompleted])
and in the criterion row, use:
>1
(You might want to take the difference in minutes and use a criterion >60).
Regards
Jeff Boyce
Microsoft Office/Access MVP
"Siegfried Heintze"
wrote in message
news:%23oNrSBPsGHA.3324@TK2MSFTNGP04.phx.gbl...
>I have a table with columns of type Date/Time labled dtStart and
>dtCompleted.
>
> How would I write a SELECT statement that would select all the rows that
> are older than 24 hours (based on the completed time) and have an
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13997
> execution time greater than 1 hour and order by the longest execution time
> (where execution time is computed by taking the difference between the
> start time and the completed time)?
>
> Thanks,
> Siegfried
>