update outm_yymm set
junno=replace(m.junno, '2014-09-19', '2014-10-01')+'X',
day1=replace(m.day1, '2014-09-19', '2014-10-01')
from outm_yymm m inner join outd_yymm d on m.junno=d.junno
and m.day1='2014-09-19' and m.manid='5'
Go
update outd_yymm set
scancode=replace(d.scancode, '2014-09-19', '2014-10-01')+'X',
junno=replace(d.junno, '2014-09-19', '2014-10-01'),
day1=replace(d.day1, '2014-09-19', '2014-10-01')
from outd_yymm d inner join outm_yymm m on d.junno=m.junno
and d.day1='2014-09-19' and m.manid='5'
outm_yymm만 업데이트되고 밑의 outd_yymm은 같이 업데이트가 안되요... |