+ -
当前位置:首页 → 问答吧 → update 问题

update 问题

时间:2011-11-09

来源:互联网

用下面语句更新字段
先用:
updata NODEDOCUMENT_1_T a set APPLICANT = (select max(d.FIRSTNAME) from pubr.sw2dnexusdate_orgpeople@old c,pubr.orgpeople@old d  
where c.subno = d.participantno AND c.mainno = a.TRANSACTIONID AND c.sortid=5); 
再用
update NODEDOCUMENT_1_T a set APPLICANT=(select max(d.fullname) 
 from pubr.sw2dnexusdate_ORGORGANIZE@old c,pubr.ORGORGANIZE@old d  
 where c.subno = d.ORGANIZENO AND c.mainno = a.TRANSACTIONID AND c.sortid=5);
结果只有后面更新的字段,前面语句更新的全变为空值。第一句的TRANSACTIONID与第二句的TRANSACTIONID是不一样的。求高手解答

作者: tl200611218   发布时间: 2011-11-09

把你的where条件再拿出来

作者: xiedi1209   发布时间: 2011-11-09