pilikowaty
SSC-Addicted
Points: 418
More actions
June 11, 2015 at 1:54 am
#304884
Hi, is there a possibility to create such a chart?( orange one)
Orange columns add amount of ton line from the previous days(in one month).
pietlinden
SSC Guru
Points: 63506
June 11, 2015 at 2:59 am
#1804618
Orange is a running sum? If you're using 2012, use a windowing function to create the running total, then just base the report on your stored procedure.
June 11, 2015 at 5:23 am
#1804646
It works.
SELECT a.ID, a.LineNum, a.DateProd,(SELECT COUNT(b.LineNum)
FROM ProdData b
WHERE b.id <= a.id
AND b.LineNum = 2 AND b.DateProd = '2015-06-11')
FROM ProdData a
WHERE a.DateProd = '2015-06-11' AND a.LineNum = 2
ORDER BY a.id;
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply