1
Answer

Query to find ClosingStock

yogita dhingra

yogita dhingra

13y
1.3k
1
Hi...
     I want to generate closing stock report. In that previous date of closingstock will become next day opening stock. how to do so.

My table contain Date,Openingstock,Production,Dispatch
ClosingStock =openinstock+production-Dispatch. I m geting Closing Stock in my query. But how to Get OpeningStock.

Query:
  select date,openingstock,production,dispatch,(openingstock+production-dispatch) as ClosingStock
  from ListDates(@StartDate,@EndDate)
Answers (1)