銷(xiāo)售綜合統(tǒng)計(jì)表查詢不對(duì)
發(fā)布于:2018-01-24 15:00:42
問(wèn)題現(xiàn)象:"銷(xiāo)售綜合統(tǒng)計(jì)表"中的"回款金額"不對(duì)
解決方案:在查詢分析器中針對(duì)錯(cuò)誤帳套的06年度執(zhí)行下面的語(yǔ)句,根據(jù)銷(xiāo)售發(fā)票上的部門(mén)更改應(yīng)收應(yīng)付明細(xì)表中同一發(fā)票號(hào)的部門(mén): update ap_detail set cDeptCode=cdepcode from ap_detail inner join ap_closebills on ap_detail.icoclosesid=ap_closebills.id where cDeptCode is null update ap_detail set cDeptCode=salebillvouch.cdepcode from ap_detail inner join salebillvouch on ap_detail.cDwcode=salebillvouch.ccuscode and ap_detail.cCoVouchtype=salebillvouch.cvouchtype and ap_detail.cCoVouchid=salebillvouch.csbvcode where cDeptCode is null update ap_detail set cDeptCode=purbillvouch.cdepcode from ap_detail inner join purbillvouch on ap_detail.cDwcode=purbillvouch.cvencode and ap_detail.cCoVouchtype=purbillvouch.cpbvbilltype and ap_detail.cCoVouchid=purbillvouch.cpbvcode where cDeptCode is null