有人可以为下面的代码提供替代解决方案吗?尝试更新多个记录时收到512错误。
update ActiveParty
set rmname = (select CONCAT(rmname,rmadr1)
from ActiveParty
where RMADR1 like ('%C/O%') or RMADR1 like ('%Attention%') or
RMADR1 LIKE '%!%%' escape '!')
where RMADR1 in (select RMADR1
from ActiveParty
where RMADR1 like ('%C/O%') or RMADR1 like
('%Attention%') or RMADR1 LIKE '%!%%' escape '!');
答案 0 :(得分:1)
您可以更简单地将其重写为:
update ActiveParty
set rmname = CONCAT(rmname,rmadr1)
where RMADR1 like ('%C/O%')
or RMADR1 like ('%Attention%')
or RMADR1 LIKE '%!%%' escape '!'