34,587
社区成员
发帖
与我相关
我的任务
分享
update LH_lh set ma2=
(
case when ma2='yi'
then '1'
when ma2='san' then '0002'
else ma2 end
) where pici='91'
update LH_lh set ma2=
(
case when ma2='yi'
then (isnull((select MAX(ma2) from LH_lh where pici<>'91' and ma1=(select ma1 from lh_lh where pici='91') and did=(select did from LH_lh where pici='91') and zid=(select zid from LH_lh where pici='91') and xid=(select xid from LH_lh where pici='91')),0)+1)
when ma2='san' then '0002'
else ma2 end
) where pici='91'