Henry Olive 5 Posted November 15, 2020 I wish everyone a healthy day I'm getting multiple rows in singleton select err.msg. UPDATE ORDERS O SET O.DELVTOTAL= (SELECT(OD.QTY - OD.REMQTY) * OD.UPRICE FROM ORDETAIL OD WHERE O.ID=OD.ID) WHERE EXISTS (SELECT 1 FROM ORDETAIL OD WHERE O.ID = OD.ID AND O.STATUS='Partial Delivery') what is wrong ? Thank You Share this post Link to post
Attila Kovacs 629 Posted November 15, 2020 Maybe a missing sum? (SELECT SUM((OD.QTY - OD.REMQTY) * OD.UPRICE) FROM ORDETAIL OD WHERE O.ID=OD.ID) Share this post Link to post