Home > database >  Small white refer to how to implement the following demand
Small white refer to how to implement the following demand

Time:04-15

Inventory list:
ID item_code qty
1 AAA 6
2 AAA 12
3 AAA 8

Pass in a ITEM_CODE='AAA' and QTY=20, realize the effect of
ID item_code qty
1 AAA 0
2 AAA 0
3 AAA 6
Please, help to write a procedure to display! Thank you very much

CodePudding user response:

Is this what is the logic in the qty=20 below the first column of the AAA 6 into 0, the second column 12 into 0 8 into the third column 6??

CodePudding user response:

Is the total number of inventory of the AAA 26, demand is 20, deductions in order, until meet the demand,
  • Related