Code:
UPDATE BMARTIN/RCU SET CUCAUS='BMARTIN' FROM BMARTIN/RCU INNER JOIN BMARTIN/RCM ON CUCUST=CCUST WHERE COMP=1 AND CZIP='17847'
UPDATE BMARTIN/RCU
SET CUCAUS='BMARTIN'
Where
Exists( Select 1 From BMARTIN/RCM where CUCUST = CCUST)
and COMP=1
and CZIP='17847'
update bmartin/slsron set slendt = lodte where exists (select 1 from bpcsffg/ecl where slord = lord and slline = lline)
update bmartin/slsron set slendt = (select lodte from bpcsffg/ecl where slord=lord and slline = lline) where exists (select 1 from bpcsffg/ecl where slord = lord and slline = lline)
update bmartin/slsron set slendt = (select lodte from bpcsffg/ecl
where slord=lord and slline = lline)
Update bmartin/slsron a set a.slendt = ( Select b.lodte from bpcsffg/ecl b where a.slord = b.lord and a.slline = b.lline)
where exists (Select 1 from bpcsffg/ecl b where a.slord = b.lord and a.slline = b.lline)
Comment