Hello,
I would like to write a query that would show the history table stock level of one item code for let's say the past year:
e.g.
Date | Item Code | Stock Level |
---|---|---|
Today | A | 5 |
Today - 1 | A | 8 |
Today - 2 | A | 76 |
..... | ..... | ..... |
Today - 365 | A | 84 |
I was planning to use the OINM table but I was wondering how to handle the loop for the 365 last days.
Anyone could help me ?
Thanks in advance,
O.