update A
set A.shl = A.shl - B.shl
from retmxls A,daysphz B
where A.spid = B.spid and
A.fdbs = B.fdbs and
A.rq = B.rq and
A.ontime > '17:37:18' and
A.shky = '002' and
A.fdbs = 'HKD'
update A
set A.shl = A.shl - B.shl
from retmxls A,daysphz B
where A.spid = B.spid and
A.fdbs = B.fdbs and
A.rq = B.rq and
A.ontime > '17:37:18' and
A.shky = '002' and
A.fdbs = 'HKD'