解决方案: |
请导入812sql版本下正确的视图。或者执行如下: DROP View JustInQ go --创建 View JustInQ Create View JustInQ AS SELECT JustInVouch.cJVCode, JustInVouch.cVouchType, JustInVouch.cWhCode, JustInVouch.dJVDate, JustInVouch.cUnitCode, JustInVouch.cDepCode, JustInVouch.cPersonCode, JustInVouch.cRdCode, JustInVouch.cJVMemo, JustInVouch.cJVDefine1, JustInVouch.cJVDefine2, JustInVouch.cJVDefine3, JustInVouch.cAccounter, JustInVouch.cMaker, Warehouse.cWhName, Vendor.cVenAbbName, Department.cDepName, Person.cPersonName, Rd_Style.cRdName, JustInVouch.bRdFlag, JustInVouch.cHandler, Person1.cPersonName AS cPersonName_1, JustInVouch.cDefine1, JustInVouch.cDefine2, JustInVouch.cDefine3, JustInVouch.cDefine4, JustInVouch.cDefine5, JustInVouch.cDefine6, JustInVouch.cDefine7, JustInVouch.cDefine8, JustInVouch.cDefine9, JustInVouch.cDefine10 FROM JustInVouch LEFT OUTER JOIN Department ON JustInVouch.cDepCode = Department.cDepCode LEFT OUTER JOIN GL_bdigest ON JustInVouch.cJVMemo = GL_bdigest.cid LEFT OUTER JOIN Person ON JustInVouch.cPersonCode = Person.cPersonCode LEFT OUTER JOIN Person Person1 ON JustInVouch.cHandler = Person1.cPersonCode LEFT OUTER JOIN Rd_Style ON JustInVouch.cRdCode = Rd_Style.cRdCode LEFT OUTER JOIN Vendor ON JustInVouch.cUnitCode = Vendor.cVenCode LEFT OUTER JOIN Warehouse ON JustInVouch.cWhCode = Warehouse.cWhCode WHERE (JustInVouch.cVouchType = '20') go --创建 view justinlist create view justinlist as SELECT JustInQ.cJVCode, JustInQ.cVouchType, JustInQ.cWhCode, JustInQ.dJVDate,JustInQ.cUnitCode, JustInQ.cDepCode, JustInQ.cPersonCode, JustInQ.cRdCode,JustInQ.cJVMemo, JustInQ.cJVDefine1, JustInQ.cJVDefine2, JustInQ.cJVDefine3, JustInQ.cAccounter, JustInQ.cMaker, JustInQ.cWhName, JustInQ.cVenAbbName,JustInQ.cDepName, JustInQ.cPersonName, JustInQ.cRdName, JustInQ.bRdFlag,JustInQ.cHandler, JustInQ.cPersonName_1, justinsq.cJVCode AS cJVCode_1,justinsq.cInvCode, justinsq.AutoID, justinsq.cInvName, justinsq.cInvStd, justinsq.cCorCode, justinsq.iJVPrice, justinsq.cFree1, justinsq.cFree2, justinsq.CorID,JustInQ.cDefine1, JustInQ.cDefine2, JustInQ.cDefine3, JustInQ.cDefine4,JustInQ.cDefine5, JustInQ.cDefine6, JustInQ.cDefine7, JustInQ.cDefine8,JustInQ.cDefine9, JustInQ.cDefine10 FROM JustInQ LEFT OUTER JOIN justinsq ON JustInQ.cJVCode = justinsq.cJVCode go drop view JustOutQ go --创建 view JustOutQ Create View JustOutQ AS SELECT JustInVouch.cJVCode, JustInVouch.cVouchType, JustInVouch.cWhCode, JustInVouch.dJVDate, JustInVouch.cUnitCode, JustInVouch.cDepCode, JustInVouch.cPersonCode, JustInVouch.cRdCode, JustInVouch.cJVMemo, JustInVouch.cJVDefine1, JustInVouch.cJVDefine2, JustInVouch.cJVDefine3, JustInVouch.cAccounter, JustInVouch.cMaker, Warehouse.cWhName, Department.cDepName, Person.cPersonName, Rd_Style.cRdName, JustInVouch.bRdFlag, JustInVouch.cHandler, Person1.cPersonName AS cPersonName_1, Customer.cCusAbbName, JustInVouch.cDefine1, JustInVouch.cDefine2, JustInVouch.cDefine3, JustInVouch.cDefine4, JustInVouch.cDefine5, JustInVouch.cDefine6, JustInVouch.cDefine7, JustInVouch.cDefine8, JustInVouch.cDefine9, JustInVouch.cDefine10 FROM JustInVouch LEFT OUTER JOIN Customer ON JustInVouch.cUnitCode = Customer.cCusCode LEFT OUTER JOIN Department ON JustInVouch.cDepCode = Department.cDepCode LEFT OUTER JOIN GL_bdigest ON JustInVouch.cJVMemo = GL_bdigest.cid LEFT OUTER JOIN Person ON JustInVouch.cPersonCode = Person.cPersonCode LEFT OUTER JOIN Person Person1 ON JustInVouch.cHandler = Person1.cPersonCode LEFT OUTER JOIN Rd_Style ON JustInVouch.cRdCode = Rd_Style.cRdCode LEFT OUTER JOIN Warehouse ON JustInVouch.cWhCode = Warehouse.cWhCode WHERE (JustInVouch.cVouchType = '21') go --创建view justoutlist create view justoutlist as SELECT JustOutQ.cJVCode, JustOutQ.cVouchType, JustOutQ.cWhCode, JustOutQ.dJVDate,JustOutQ.cUnitCode, JustOutQ.cDepCode, JustOutQ.cPersonCode, JustOutQ.cRdCode,JustOutQ.cJVMemo, JustOutQ.cJVDefine1, JustOutQ.cJVDefine2, JustOutQ.cJVDefine3,JustOutQ.cAccounter, JustOutQ.cMaker, JustOutQ.cWhName, JustOutQ.cDepName,JustOutQ.cPersonName, JustOutQ.cRdName, JustOutQ.bRdFlag, JustOutQ.cHandler,JustOutQ.cPersonName_1, JustOutQ.cCusAbbName,justoutsq.cJVCode AS cJVCode_1, justoutsq.cInvCode, justoutsq.AutoID,justoutsq.cInvName, justoutsq.cInvStd, justoutsq.iJVPrice, justoutsq.cFree1,justoutsq.cFree2, justoutsq.cObjCode, justoutsq.cName, JustOutQ.cDefine1,JustOutQ.cDefine2, JustOutQ.cDefine3, JustOutQ.cDefine4, JustOutQ.cDefine5,JustOutQ.cDefine6, JustOutQ.cDefine7, JustOutQ.cDefine8, JustOutQ.cDefine9,JustOutQ.cDefine10 FROM JustOutQ LEFT OUTER JOIN justoutsq ON JustOutQ.cJVCode = justoutsq.cJVCode go |