Sunday, 8 September 2013

Find Missing Records from table in SqlServer2005

Find Missing Records from table in SqlServer2005

The Table with Columns StartTime and Endtime,The Starttime will be Equal
to Endtime of previous Record.
Starttime EndTime
2013-09-07 23:52:42.000 2013-09-07 23:54:46.000
2013-09-07 23:48:09.000 2013-09-07 23:50:18.000
---------------Here I am Missing Data---------------------
2013-09-07 23:23:31.000 2013-09-07 23:26:12.000
2013-09-07 23:21:15.000 2013-09-07 23:23:31.000
Need Help to Write a T-SQL query to retrieve the missing records (the
gaps) Here In this Example I am missing Record with Starttime#2013-09-07
23:26:12.000 to EndTime#2013-09-07 23:48:09.000

No comments:

Post a Comment