I want to select the data for previous two week.

  • Hi I need a help to select the previous week data. that week should end with most recent Friday

    (i.e 12/05 - 12/11).

    Any help would really helpful.

  • Since today is Friday (12/18) are we talking about the previous Friday and two weeks back (12/11)? Would this date also be the same when run on Saturday (run 12/12, previous Friday would be 12/11)?

  • If you run on saturday(12/19) it should like first week is 12/12 to 12/18 and second week should be 12/05-12/11.

    Please let me know if this is not clear

  • And what if the query is run on any other day than saturday?

    What if i run it on 12/22 or 12/25? What should the date ranges be for each week in each of those scenarios?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

You must be logged in to reply to this topic. Login to reply