vitex2003 (1/30/2014)
SELECT RangeType,StartDate,EndDate,CommentFROM 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)
You're code has the same performance and scalability problems as Jerry's code does. Please see my reply to him just above this post.
--Jeff Moden
Change is inevitable... Change for the better is not.