Notice that the BETWEEN operator can produce different result in different databases!In some databases, BETWEEN selects fields that are between and excluding the test values.In other databases, BETWEEN selects fields that are between and including the test values.And in other databases, BETWEEN selects fields between the test values, including the first test value and excluding the last test value.Therefore: Check how your database treats the BETWEEN operator!For me it's worked fine DECLARE @Temp TABLE(time DATETIME,var1 INT,var2 VARCHAR(20))INSERT INTO @Temp Values('12:00:01PM',1,'value'),('12:00:05PM',2,'value1'),('12:00:08PM',3,'value2'),('12:00:20PM',4,'value3'),('12:00:30PM',5,'value4')SELECT * FROM @Temp WHERE time BETWEEN '1900-01-01 12:00:01.000' AND '1900-01-01 12:00:08.000'
---------------Murali KrishnaYou live only once ..If you do it right once is enough.......