解决方案: | 集团未出补丁给出临时方案执行语句:if exists (select * from dbo.sysobjects where id = object_id(N’[dbo].[vwNELoanHead]‘) and OBJECTPROPERTY(id, N’IsView’) = 1) drop view [dbo].[vwNELoanHead] go Create VIEW dbo.vwNELoanHead AS SELECT dbo.NE_LoanVouch.GUID, Cast(dbo.NE_LoanVouch.ts As money) As ts, dbo.NE_LoanVouch.strTypeCode, dbo.NE_OperationType.strName AS strTypeName, dbo.NE_LoanVouch.strVouchID, dbo.NE_LoanVouch.dtLoanDate, dbo.NE_LoanVouch.strDepartID, dbo.Department.cDepName AS strDepart, dbo.NE_LoanVouch.strLoanID, Person_1.cPersonName AS strLoan, dbo.NE_LoanVouch.strItemClassID, dbo.fitem.citem_name AS strItemClass, dbo.NE_LoanVouch.strItemID, dbo.NE_LoanVouch.strBudItemID, dbo.NE_LoanVouch.strBill, dbo.NE_LoanVouch.fltRate, dbo.NE_LoanVouch.dblMoney, dbo.NE_LoanVouch.dblOldMoney, dbo.NE_LoanVouch.strUsed, dbo.NE_LoanVouch.dtExpDate, dbo.NE_LoanVouch.strPersonID, dbo.NE_LoanVouch.strAuditorID, dbo.NE_LoanVouch.strMakerID, dbo.NE_LoanVouch.cDefine1, dbo.NE_LoanVouch.cDefine2, dbo.NE_LoanVouch.cDefine4, dbo.NE_LoanVouch.cDefine3, dbo.NE_LoanVouch.cDefine5, dbo.NE_LoanVouch.cDefine6, dbo.NE_LoanVouch.cDefine7, dbo.NE_LoanVouch.cDefine8, dbo.NE_LoanVouch.cDefine9, dbo.NE_LoanVouch.cDefine10, dbo.NE_LoanVouch.cDefine11, dbo.NE_LoanVouch.cDefine12, dbo.NE_LoanVouch.cDefine13, dbo.NE_LoanVouch.cDefine14, dbo.NE_LoanVouch.cDefine15, dbo.NE_LoanVouch.cDefine16, dbo.NE_LoanVouch.AutoID, BGItem.cItemName AS strBudItem, dbo.NE_LoanVouch.strPort1, dbo.NE_LoanVouch.strPort1Value, dbo.NE_LoanVouch.strPort2, dbo.NE_LoanVouch.strPort2Value, dbo.NE_LoanVouch.strPort3, dbo.NE_LoanVouch.strPort3Value, dbo.NE_LoanVouch.blnBegin, NE_AuditType.cAudi as blnAudi,NE_AuditType.LocaleID, NE_LoanVouch.intOverBud, NE_LoanVouch.strOverDesc,NE_LoanVouch.strOverPerson,convert(nvarchar(10),NE_LoanVouch.strOverDate,126) as strOverDate FROM dbo.Person Person_1 RIGHT OUTER JOIN dbo.NE_LoanVouch Left join NE_AuditType on NE_LoanVouch.blnAudi=NE_AuditType.blnAudi LEFT OUTER JOIN dbo.BG_V_CtrlItem BGItem ON dbo.NE_LoanVouch.strBudItemID = BGItem.cItemCode COLLATE Chinese_PRC_CI_AS ON Person_1.cPersonCode = dbo.NE_LoanVouch.strLoanID LEFT OUTER JOIN dbo.Department ON dbo.NE_LoanVouch.strDepartID = dbo.Department.cDepCode LEFT OUTER JOIN dbo.fitem ON dbo.NE_LoanVouch.strItemClassID = dbo.fitem.citem_class LEFT OUTER JOIN dbo.NE_OperationType ON dbo.NE_LoanVouch.strTypeCode = dbo.NE_OperationType.strCode go if exists (select * from dbo.sysobjects where id = object_id(N’[dbo].[vwNEExpenHead]‘) and OBJECTPROPERTY(id, N’IsView’) = 1) drop view [dbo].[vwNEExpenHead] go Create VIEW vwNEExpenHead AS SELECT NE_ExpenVouch.GUID, NE_ExpenVouch.AutoID, Cast(NE_ExpenVouch.ts As money) AS ts, NE_ExpenVouch.strTypeCode, NE_OperationType.strName AS strTypeName, NE_ExpenVouch.strVouchID, NE_ExpenVouch.dtLoanDate, NE_ExpenVouch.strDepartID, Department.cDepName AS strDepart, NE_ExpenVouch.strLoanID, Person.cPersonName AS strLoan, NE_ExpenVouch.strItemClassID, fitem.citem_name AS strItemClass, NE_ExpenVouch.strItemID, ” AS strItem, NE_ExpenVouch.strBudItemID, bud.cItemName AS strBudItem, NE_ExpenVouch.strBill, NE_ExpenVouch.fltRate, NE_ExpenVouch.dblMoney, NE_ExpenVouch.dblOldMoney, NE_ExpenVouch.strUsed, NE_ExpenVouch.strPersonID, NE_ExpenVouch.strAuditorID, NE_ExpenVouch.strMakerID, NE_ExpenVouch.cDefine1, NE_ExpenVouch.cDefine2, NE_ExpenVouch.cDefine3, NE_ExpenVouch.cDefine4, NE_ExpenVouch.cDefine5, NE_ExpenVouch.cDefine6, NE_ExpenVouch.cDefine7, NE_ExpenVouch.cDefine8, NE_ExpenVouch.cDefine9, NE_ExpenVouch.cDefine10, NE_ExpenVouch.cDefine11, NE_ExpenVouch.cDefine12, NE_ExpenVouch.cDefine13, NE_ExpenVouch.cDefine14, NE_ExpenVouch.cDefine15, NE_ExpenVouch.cDefine16, NE_ExpenVouch.strPort1, NE_ExpenVouch.strPort1Value, NE_ExpenVouch.strPort2, NE_ExpenVouch.strPort2Value, NE_ExpenVouch.strPort3, NE_ExpenVouch.strPort3Value,NE_ExpenVouch.strVerifier,NE_ExpenVouch.blnSettle, NE_AuditType.cAudi as blnAudi,NE_AuditType.LocaleID, NE_ExpenVouch.intOverBud, NE_ExpenVouch.strOverDesc,NE_ExpenVouch.strOverPerson,convert(nvarchar(10),NE_ExpenVouch.strOverDate,126) as strOverDate FROM NE_ExpenVouch Left join NE_AuditType on NE_ExpenVouch.blnAudi=NE_AuditType.blnAudi LEFT OUTER JOIN fitem ON NE_ExpenVouch.strItemClassID = fitem.citem_class LEFT OUTER JOIN Person ON NE_ExpenVouch.strLoanID = Person.cPersonCode LEFT OUTER JOIN Department ON NE_ExpenVouch.strDepartID = Department.cDepCode LEFT OUTER JOIN NE_OperationType ON NE_ExpenVouch.strTypeCode = NE_OperationType.strCode LEFT OUTER JOIN BG_V_CtrlItem bud ON bud.cItemCode = NE_ExpenVouch.strBudItemID GO |
---|