回 帖 发 新 帖 刷新版面

主题:用财务软件时“对象名 'vwVouchJE' 无效”

用财务软件升级数据库时出现以下错误,看不懂下面的语句,只知道是创建视图!请大虾指导一下!谢谢!!



错误信息:
-2147217865
对象名 'vwVouchJE' 无效。

执行如下语句时出错:
CREATE view vwWater as
SELECT a.dtVoucherDate, a.strUnitID,b.strUnitName, a.strVoucherID, a.strDigest, 
      a.strAccBankID, isnull(a.dblTotal, 0) AS SR, 
      JE AS SRwb, 0 AS ZC, 0 AS ZCwb, 0 AS YE, 0 AS YEwb, a.strCurrencyID AS strBill
FROM dbo.UA_Voucher AS a INNER JOIN
      UA_UnitDef AS b ON a.strUnitID = b.strUnitID INNER JOIN vwVouchJE AS c ON a.intNoID=c.intNoID 
WHERE LEFT(a.strVoucherType, 1) = '收' AND strAccBankID IS NOT NULL
GROUP BY a.intNoID,a.dtVoucherDate, a.strUnitID,a.strUnitName,b.strUnitName, a.strVoucherID, a.strDigest, 
      a.strAccBankID, a.strCurrencyID, a.sngExchangeRate,a.dblTotal,JE
UNION ALL
SELECT a.dtVoucherDate, a.strUnitID,b.strUnitName, a.strVoucherID, a.strDigest, 
      a.strAccBankID, 0 AS SR, 0 AS SRwb, isnull(a.dblTotal, 0) AS ZC, 
      JE AS ZCwb, 0 AS YE, 0 AS YEwb, a.strCurrencyID
FROM dbo.UA_Voucher as a inner join UA_UnitDef AS b ON a.strUnitID = b.strUnitID INNER JOIN vwVouchJE AS c ON a.intNoID=c.intNoID
WHERE LEFT(a.strVoucherType, 1) = '支' AND strAccBankID IS NOT NULL
GROUP BY a.intNoID,a.dtVoucherDate, a.strUnitID,a.strUnitName,b.strUnitName, a.strVoucherID, a.strDigest, 
      a.strAccBankID, a.strCurrencyID, a.sngExchangeRate,a.dblTotal,JE

回复列表 (共1个回复)

沙发

是没找到表'vwVouchJE'

我来回复

您尚未登录,请登录后再回复。点此登录或注册