DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
SET @StartDate = '2009/02/08'
SET @EndDate = '2009/02/24'
SELECT
(DATEDIFF(dd, @StartDate, @EndDate) + 1)
-(DATEDIFF(wk, @StartDate, @EndDate) )
-(CASE WHEN DATENAME(dw, @StartDate) = 'Sunday'and...