Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Jeff Moden Finding “Active” Rows for the Previous Month (SQL Spackle) RE: Finding “Active” Rows for the Previous Month (SQL Spackle)
vitex2003
SSC Journeyman
Points: 96
More actions
January 30, 2014 at 7:40 am
#1684675
SELECT RangeType,StartDate,EndDate,Comment
FROM dbo.TestTable
WHERE convert(char(10),EndDate,102) >= cast('01 Oct 2013' as datetime)
AND convert(char(10),StartDate,102) <= cast('01 Nov 2013' as datetime)