Answer by Blackhawk-17
OK, Here goes a better attempt without a quirky update... Again using @Phil Factor's test data: declare @Dt table (TestDate DateTime) insert into @dt (testdate) values (convert(datetime,'26/07/2010...
View ArticleAnswer by Blackhawk-17
Borrowing heavily from Phil Factor's answer I have a partial solution but one that raises my own question. I can get (sort of) the start and end times of the error bunches and I also get the single...
View ArticleAnswer by Phil Factor
I've made the test data a little bit more realistic as it has an error overlapping a second boundary. This solution relies on the data being inserted into the heap in datetime order declare @Dt table...
View ArticleAnswer by Squirrel
select min(datecol), max(datecol) from yourtable group by convert(smalldatetime, datecol)
View ArticleAnswer by Cyborg
SELECT MIN(TestDate),MAX(TestDate) FROM Dt GROUP BY CONVERT(VARCHAR,TestDate,101),DATEPART(HH,TEstDate),DATEPART(Mi,TestDate) Remarks: Dt Is the Table Name and TestDate is the column Name
View ArticleAnswer by Squirrel
where ( eventdate - dateadd(day, datediff(day, 0, date_col), 0) >= '01:00:03' and eventdate - dateadd(day, datediff(day, 0, date_col), 0) < '01:00:08' ) OR ( eventdate - dateadd(day,...
View ArticleAnswer by Blackhawk-17
OK, Here goes a better attempt without a quirky update... Again using @Phil Factor's test data: declare @Dt table (TestDate DateTime) insert into @dt (testdate) values (convert(datetime,'26/07/2010...
View ArticleAnswer by Blackhawk-17
Borrowing heavily from Phil Factor's answer I have a partial solution but one that raises my own question. I can get (sort of) the start and end times of the error bunches and I also get the single...
View ArticleAnswer by Phil Factor
I've made the test data a little bit more realistic as it has an error overlapping a second boundary. This solution relies on the data being inserted into the heap in datetime order declare @Dt table...
View ArticleAnswer by Squirrel
select min(datecol), max(datecol) from yourtable group by convert(smalldatetime, datecol)
View ArticleAnswer by Cyborg
SELECT MIN(TestDate),MAX(TestDate) FROM Dt GROUP BY CONVERT(VARCHAR,TestDate,101),DATEPART(HH,TEstDate),DATEPART(Mi,TestDate) Remarks: Dt Is the Table Name and TestDate is the column Name
View ArticleAnswer by Squirrel
where ( eventdate - dateadd(day, datediff(day, 0, date_col), 0) >= '01:00:03' and eventdate - dateadd(day, datediff(day, 0, date_col), 0) < '01:00:08' ) OR ( eventdate - dateadd(day,...
View Article