Hai guys,
sorry if this is SQL question not VB question.
I have a table say ProductionDaily that have field
ProductCode char, ProdDate date, OpBal numeric,
Received numeric, Process numeric
User just fill in OpBal for the 1st day of current month and spesific
productcode
And then fill in Received, Process in any particular date for the
current month.
How do I make a sql statement that get the endbalance (OpBal + Received
- Process), and this EndBalance will be use as OpBal for the next day of
that Productcode in report.
Say for example
The user fill in :
ProdDate ProductCode OpBal Received Process EndBal
01/01/03 OP 5 10 6 =09
01/02/03 OP 15 12
01/02/03 TO 3 12 8
01/03/03 OP 13 16
01/04/03 OP 15 20
01/04/03 TO 18 16
So in my sql I want to get the result like
ProdDate ProductCode OpBal Received Process EndBal
01/01/03 OP 5 10 6 9
01/02/03 OP 9 15 12 12
01/03/03 OP 12 13 16 9
01/04/03 OP 9 15 20 4
01/02/03 TO 3 12 8 5
01/04/03 TO 5 18 16 7
Do you get what I meant. So how the sql statement that I must write
TIA
zulfazli