阅读背景:

使用SQL查找数据库记录中的间隙(缺少记录)

来源:互联网 

I have a table with records for every consecutive hour. Each hour has some value. I want a T-SQL query to retrieve the missing records (missing hours, the gaps). So for the DDL below, I should get a record for missing hour 04/01/2010 02:00 AM (assuming date range is between the first and last record). Using SQL Server 2005. Prefer a set based query.I have a table with records for every consecuti




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: