Forum Replies Created

Viewing 2 posts - 1 through 3 (of 3 total)

  • RE: Please help me!!

    I made some corrections... I tried to create single query.

     
    
    SELECT
    (DATEDIFF(d, @startdate, @enddate)/7)
    + CASE
    WHEN DATEPART(dw, @startdate) = (6)
    OR DATEPART(dw, @enddate) = (6)...
  • RE: Please help me!!

    This one should work. It is single query.

    You can change number (6) to number of day that you need to count. Friday = 6 when SET DATEFIRST 7.

     

Viewing 2 posts - 1 through 3 (of 3 total)