• adisql - Friday, November 17, 2017 5:32 PM

    Lynn Pettis - Friday, November 17, 2017 5:06 PM

    adisql - Friday, November 17, 2017 4:32 PM

    Lynn Pettis - Friday, November 17, 2017 2:49 PM

    adisql - Friday, November 17, 2017 10:08 AM

    Hi,

    I would like to add new variable(Current Complete Week -1) to the SP for below condition.

    Current Complete Week -1:
    Intention is to return the week previous to current week.
    If Max(Sales_date) is Sunday, then count back two Mondays to the next Sunday,
    else count back three Mondays to the next Sunday.

    Please find attachment as SP.

    Thank you !!

    It's Friday and I have a lot of other things on my mind besides work as well.  How about showing us what you are trying to accomplish with some examples.

    I have prepared the attached code part and included in my SP. PFA.

    That's nice, but it doesn't show me what you are asking for at this time.  Given date x, what do you expect in return?  Show me that, not your code.

    Current complete week:
    2017-10-30 00:00:00              2017-11-05 00:00:00

    we need to add one more new variable for "Current complete week-1" to this sp ,that should displays the data for the week of below.

    Current complete week-1 :
    2017-10-23 00:00:00            2017-10-29 00:00:00

    In Application, if we click the button "Current complete week" , it displays the below week.
    2017-10-23 00:00:00    2017-10-29 00:00:00

    In the same manner..

    In Application, if we click the button "Current complete week-1" then it should display the below week.

    2017-10-23 00:00:00    2017-10-29 00:00:00