Maddus Mattus said:
So if I understand correctly, you only want rows included that have a ten minute intersect?
And if no rows are found you want a default selection?
Then I would suggest you develop a cursor to fill a temp table and if the table has 0 rows, fire off another query,..
Then select the temp table as a resultset,..
Yes, if a row overlaps a specified datetime, not only return that row, but all the rows that are in the 10-minute adjacent set this row belongs to.