0
I need to make a update in a given field, where it should reach at least up to "zero" cannot be negative. And when it reaches zero I need it to give the update of the remaining quantity in the next field. "".
Example: I’m going down 9948
Unit Quantity Expira
9947 10/10/2017
9947 10/11/2017
Wrong shape :
Unit Quantity Expira
-1 10/10/2017
9947 10/11/2017
Correct form :
Unit Quantity Expira
0 10/10/2017
9946 10/11/2017
Query :
UPDATE invdtl
SET untqty = untqty - 9948
WHERE prtnum = 'OP-CX44LT'
AND invsts = 'LIB'
AND lst_arecod IN ('1SUPRCK')
AND expire_dte <= TRUNC(expire_dte)
You should edit your question and put that image there and delete that 'answer'.
– Reginaldo Rigo