解决方案: |
update b set cmemo=a.cmemo
from ufdata_003_2005..salebillvouch a inner join ufdata_003_2006..salebillvouch b on a.csbvcode=b.csbvcode
where isnull(a.cmemo,'')<>isnull(b.cmemo,'') and b.ddate<'2006-1-1'
update b set cdigest=a.cdigest
from ufdata_003_2005..ap_detail a inner join ufdata_003_2006..ap_detail b on a.ccovouchid=b.ccovouchid
and a.ccovouchtype=b.ccovouchtype and a.cflag=b.cflag and a.cvouchtype=b.cvouchtype
where isnull(a.cdigest,'')<>isnull(b.cdigest,'') and b.dvouchdate<'2006-1-1' and b.ccovouchtype='27' and b.cflag='ar'and a.cprocstyle not like '9%'
|