Forum Replies Created

Viewing 2 posts - 346 through 347 (of 347 total)

  • RE: BETWEEN in SQL Variables

    I am trying to calculate revenue between the startdate and enddates.

    DECLARE @MonthStartDate DATETIME

    DECLARE @MonthEndDate DATETIME

    DECLARE @MonthToDate DATETIME

    DECLARE @TodaysDate DATETIME

    SET @TodaysDate = '5/29/2009'

    IF (@TodaysDate BETWEEN '3/27/2009' AND '4/23/2009')

    BEGIN...

  • RE: BETWEEN in SQL Variables

    DECLARE @MonthStartDate DATETIME

    DECLARE @MonthEndDate DATETIME

    DECLARE @MonthToDate DATETIME

    SET @MonthStartDate ='5/1/2009'

    SET @MonthEndDate ='5/31/2009'

    SET @MonthToDate BETWEEN @MonthEndDate AND @MonthStartDate

    SELECT @MonthToDate

    I am trying to assign the Dates between '5/1/2009' AND '5/31/2009' to variable...

Viewing 2 posts - 346 through 347 (of 347 total)