Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Running Totals

    ThanKS Eirikur Eiriksson thats close, ill see if i can get your version to match the expected output even on the negatives.

  • RE: Running Totals

    I will take a look at the Running total link you have sent

    but just to make things clear the TargetRunningStock is the expected output i am trying to get in...

  • RE: Running Totals

    Sorry i should have been more clear

    This problem is coming from an excel based solution that is now being converted to SQLServer, And the TargetRunningStock was calculated in excel...

  • RE: How To Group By Values Over None Contiguous Data

    A big thank you for that.

    The big problem was goggling the right problem, (didn't know "GAPS and ISLANDS"), ill look into that link

    Again thanks

  • RE: Help getting all the weeks between two random dates for each row

    The reason fro the gap is that these are weeks in the year in the format YYYYWW so the first week in the year 201301 and the last 201252, in...

  • RE: Help getting all the weeks between two random dates for each row

    Apologies - Lets try that again

    --DROP TABLE IF IT EXISTS

    IF OBJECT_ID('TempDB..#StoreItemWeeksHave','U') IS NOT NULL

    BEGIN

    DROP TABLE #StoreItemWeeksHave

    END

    IF OBJECT_ID('TempDB..#StoreItemWeeksNeed','U') IS NOT NULL

    BEGIN

    DROP TABLE #StoreItemWeeksNeed

    END

    IF OBJECT_ID('TempDB..#Weeks','U') IS NOT NULL

    BEGIN

    DROP TABLE #Weeks

    END

    --CREATE THE TABLE(s)

    IF...

Viewing 6 posts - 1 through 6 (of 6 total)