Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个表格,其中有一列是日期时间。任何人都可以建议我,如果有一种方法可以从我找到前两个日期差异 > 120 秒的记录开始检索接下来的 20 条记录?那可能吗?...
这就像找到坐标列表的第一站。
在此先感谢大家!
干杯,路易吉
Select top 20 * from Log where dt >= (select Min(DT) from Log l -- not sure what you are looking for >= or = where Exists(Select * from Log l2 where DateDiff(ss,l.DT,l2.DT)>120 and l.DT=(Select max(DT) from Log l3 where l3.DT<l2.DT) ) )
SQL小提琴