解决方案: |
--将出库调整单的属性调整为其他,执行如下语句前请作好数据备份!!
update ia_subsidiary
set bsale=0
from ia_subsidiary join select bsale,autoid from JustInVouch join JustInVouchs on JustInVouch.cjvcode=JustInVouchs.cjvcodeas aa on ia_subsidiary.justid=aa.autoid where cvoutype=‘21‘ and ia_subsidiary.bSale=1 and aa.bsale is null
update JustInVouch
set bsale=0
from JustInVouch join JustInVouchs on JustInVouch.cjvcode=JustInVouchs.cjvcode join ia_subsidiary on ia_subsidiary.justid=JustInVouchs.autoid where cvoutype=‘21‘ and ia_subsidiary.bSale=0 and JustInVouch.bsale=1 |