解决方案: |
由于视图错误造成,按上年的视图创建今年的视图,问题可以解决。
drop view ar_closer
go
CREATE VIEW AR_CloseR
AS
SELECT Ap_CloseBill.iID,Ap_CloseBill.cVouchType,Ap_CloseBill.cVouchID, Ap_CloseBill.dVouchDate,Ap_CloseBill.cDwCode,Ap_CloseBill.cSSCode, Ap_CloseBill.cDeptCode,Ap_CloseBill.cNoteNo,Ap_CloseBill.cBankAccount, SettleStyle.cSSName,Ap_CloseBill.iPeriod,Customer.iID As cAuthID, Ap_CloseBill.cPerson, Person.cPersonName,Ap_CloseBill.cItem_Class, Ap_CloseBill.cItemCode,Ap_CloseBill.cItemName,Ap_CloseBill.cDigest,Ap_CloseBill.cexch_name, Ap_CloseBill.iExchRate, Ap_CloseBill.iAmount_f,Ap_CloseBill.iAmount, Ap_CloseBill.iRAmount_f,Ap_CloseBill.iRAmount, Ap_VouchType.cTypeName,Customer.cCusAbbName,Customer.cCusName,Department.cDepName, Ap_CloseBill.cFlag,Ap_CloseBill.cCheckMan,Ap_CloseBill.cOperator, Ap_CloseBill.cCancelMan,Ap_CloseBill.iPayForOther,Ap_CloseBill.cBank, Ap_CloseBill.cNatBank,Ap_CloseBill.cNatBankAccount,Ap_CloseBill.bFromBank, Ap_CloseBill.bToBank,Ap_CloseBill.bSure,Ap_CloseBill.cCode,Ap_CloseBill.cCancelNo, Ap_CloseBill.bStartFlag,Ap_CloseBill.cCoVouchType,Ap_CloseBill.cCoVouchID, Ap_CloseBill.cPZID,Ap_CloseBill.VT_ID,convert(char,convert(money,Ap_CloseBill.Ufts),2) as Ufts, Ap_CloseBill.cOrderNo, Ap_CloseBill.cDefine1,Ap_CloseBill.cDefine2,Ap_CloseBill.cDefine3, Ap_CloseBill.cDefine4, Ap_CloseBill.cDefine5,Ap_CloseBill.cDefine6,Ap_CloseBill.cDefine7, Ap_CloseBill.cDefine8, Ap_CloseBill.cDefine9,Ap_CloseBill.cDefine10,Ap_CloseBill.cDefine11,Ap_CloseBill.cDefine12, Ap_CloseBill.cDefine13,Ap_CloseBill.cDefine14,Ap_CloseBill.cDefine15,Ap_CloseBill.cDefine16 FROM Ap_CloseBill LEFT OUTER JOIN Ap_VouchType ON Ap_CloseBill.cVouchType = Ap_VouchType.cTypeCode LEFT OUTER JOIN Customer ON Ap_CloseBill.cDwCode = Customer.cCusCode LEFT OUTER JOIN Department ON Ap_CloseBill.cDeptCode = Department.cDepCode LEFT OUTER JOIN SettleStyle ON Ap_CloseBill.cSSCode = SettleStyle.cSSCode LEFT OUTER JOIN Person ON Ap_CloseBill.cPerson = Person.cPersonCode WHERE Ap_CloseBill.cFlag='AR' |