Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    20
    Provided Answers: 1

    Exclamation Unanswered: Help - I need to get data for 5 week rolling

    I am trying to get data for 5 weeks rolling from the current timeperiod passed to query:

    Code:
    SELECT PD.NAME AS PERIODNAME, PL.NAME AS PERIODLIST
    FROM PERIOD PD
    JOIN PERIOD PL ON PL.PERIOD_STARTDATE >= PD.PERIOD_STARTDATE - 5 WEEK
                          AND PL.PERIOD_ENDDATE <= PD.PERIOD_ENDDATE
                          AND PL.DURATION = 'biweek'
    WHERE PD.DURATION = 'biweek'
    AND     PD.NAME = 'BW3 2017'
    The - 5 Week keeps giving me an error in db2. How I get 5 rolling weeks.

  2. #2
    Join Date
    Oct 2007
    Posts
    161
    Provided Answers: 9
    35 days
    Also, this doesn't seem like the right set up for a rolling 5 weeks. Normally, when it said for a rolling period of time you want some kind of total for each 5 week span during your time period or occurrences of something grouped by each 5 weeks.

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •