Viewing 8 posts - 1 through 8 (of 8 total)
The Tuesday issue was my fault, I'd got a bracket in the wrong place so I was adding one to the day instead of one to the week!
February 13, 2011 at 7:05 am
LutzM (2/3/2011)
SELECT DATEADD(WEEK, DATEDIFF(WEEK, 0, GETDATE()), 0)
SELECT DATEADD(WEEK, DATEDIFF(WEEK, '19000101', GETDATE()), '19000101')
If...
February 6, 2011 at 6:42 am
LutzM (1/18/2011)
Nicky Murphy (1/18/2011)
Very neat!Is there a way of grouping by other intervals e.g. a week or a month?
Yes.
Just change GROUP BY DATEADD(DAY, DATEDIFF(DAY, 0, TIMESTAMP), 0)
to the range...
February 3, 2011 at 12:44 am
Very neat!
Is there a way of grouping by other intervals e.g. a week or a month?
January 18, 2011 at 1:44 pm
Thanks, I found this post (http://www.sqlservercentral.com/Forums/Topic869737-338-1.aspx) that used APPLY but I couldn't get it working with MAX unless I went via a temp table.
January 18, 2011 at 8:14 am
All the tables are in sysarticles and syssubscriptions. The status column = 2 = Active. The agents are running and there are commands appearing in MSrepl_commands tables with Article ID's...
July 11, 2006 at 4:43 am
Perhaps it should be moved to a higher traffic forum, like Administration.
July 10, 2006 at 9:32 am
The SP's have to be independent because they are designed to live on different machines hundreds of miles away. Ultimately they will, I just want an easy way to test...
August 4, 2005 at 8:35 am
Viewing 8 posts - 1 through 8 (of 8 total)