Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Clearing Change Log Entries Expand / Collapse
Author
Message
Posted Thursday, January 7, 2010 9:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 1, 2011 3:44 AM
Points: 0, Visits: 7
Comments posted to this topic are about the item Clearing Change Log Entries
Post #843665
Posted Tuesday, January 19, 2010 1:42 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 2:13 PM
Points: 281, Visits: 318
Alternatively, replace all the date calc code with:

select @qdt=dateadd(m,-1,dateadd(d,datediff(d,'1 Jan 1900',getdate()),'1 Jan 1900')-datepart(d,getdate())+1)

This returns the first day of the previous month, 12:00 am, as does the given script.

An explanation of what the code was doing would have been nice, rather than having to work it out. However, the majority is not needed as SQL provides all the necessary functions for doing date calcs...
Post #850108
Posted Thursday, June 10, 2010 4:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 18, 2013 9:57 PM
Points: 1, Visits: 67
Incomplete script.
Post #935254
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse