|
noblemfd
Starting Member
Nigeria
18 Posts |
Posted - 05/26/2012 : 04:31:50
|
Am developing an application with VB and MSSQL 2000. Database is JUTA and table is Inventory The fields are InvDate, InvID, ShelfID, IN, OUT, Type. I want it in such a way that Whenever there is no opening balance in a particular shelf, it should insert a row and populate it with the data of the other shelf with the same InvID, but make the field βINβ to be zero(β0β) and put its own shelf name. For example, see Shelf1, Shelf2 and Shelf3 of Inv ID 000003. How do I do this.
EXPECTED OUTPUT InvDate1 InvID IN OUT Bal Shelf Type 03/09/2000 000001 10 0 10 shelf1 BegBal 03/09/2000 000001 40 0 40 shelf 2 BegBal 03/09/2000 000001 30 0 30 shelf 3 BegBal 03/09/2000 000002 100 0 100 shelf 1 BegBal 03/09/2000 000002 0 0 0 shelf 2 BegBal 03/09/2000 000002 0 0 0 shelf 3 BegBal 04/09/2000 000001 35 0 35 shelf 1 D00001 04/09/2000 000001 20 0 20 shelf 1 D00001 04/09/2000 000002 50 0 50 shelf 3 D00001 06/09/2000 000003 0 0 0 shelf 1 BegBal 06/09/2000 000003 15 0 15 shelf 2 BegBal 06/09/2000 000003 0 0 0 shelf 3 BegBal
|
|