Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Syntax Help Needed - Time Diffs
Message
De
02/03/2002 11:15:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00626592
Message ID:
00627394
Vues:
23
>I have a log table with 4000 rows, each with a datetime stamp of when an action occured. I am trying to do a "date diff" between each row, and only show those rows that have taken longer than n seconds. I'm trying to get away from doing a table scan, does anyone have any help for doing it with pure SQL?
select * ;
from logtable lt ;
where lt.timestamp-lnGap > ;
(select max(timestamp) from logtable where timestamp < lt.timestamp)
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform