workandothernonsense.com
DECLARE-ing War!
When… DECLARE @EndDate DATE; DECLARE @StartDate DATE; –SET @StartDate = DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) – 1, 0); –SET @EndDate = DATEADD(MONTH, DATEDIFF(MONTH, …