Viewing 6 posts - 1 through 6 (of 6 total)
ThanKS Eirikur Eiriksson thats close, ill see if i can get your version to match the expected output even on the negatives.
January 12, 2015 at 7:02 am
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...
January 12, 2015 at 6:50 am
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...
January 12, 2015 at 5:30 am
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
July 22, 2014 at 9:29 am
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...
February 28, 2013 at 10:09 am
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...
February 28, 2013 at 9:31 am
Viewing 6 posts - 1 through 6 (of 6 total)