直接SQL帐表有问题
金蝶云社区-吴泰金
吴泰金
0人赞赏了该文章 484次浏览 未经作者许可,禁止转载编辑于2016年11月23日 17:28:04

我视图查询出来的数据是正确的,但是SQL帐表出来的数据就是不全

底下是视图的语句:

SELECT bill.FNAME AS 单据名称, sal.FBILLNO AS 单据编码, sal.FDATE AS 单据日期, org.FNAME AS 销售组织, cu.FNUMBER AS 客户编码, cu.FNAME AS 客户名称,
cu.fsf AS 省份, cu.fsj AS 市级, cu.fxj AS 县级, oper.fpersonnumber AS 销售员编码, oper.fSTAFFname AS 销售员名称, oper.fdeptname AS 销售员部门,
oper.fOPERATORGROUPnumber AS 销售组编码, oper.fOperatorgroupname AS 销售组名称, ma.fmagroupname AS 存货类别, ma.FNUMBER AS 物料编码,
ma.fname AS 物料名称, un.FNAME AS 基本单位, st.FNAME AS 仓库, CONVERT(numeric(8, 2), salprice.FTAXRATE) AS 税率, CONVERT(numeric(8, 2),
salentry.FMUSTQTY) AS 应收数量, CONVERT(numeric(8, 2), salentry.FREALQTY) AS 实发数量, CONVERT(numeric(8, 2), salprice.FTAXPRICE) AS 含税单价,
CONVERT(numeric(8, 2), salprice.FTAXAMOUNT) AS 税额, CONVERT(numeric(10, 2), salprice.FALLAMOUNT) AS 价税合计
FROM dbo.T_SAL_OUTSTOCK AS sal INNER JOIN
dbo.T_SAL_OUTSTOCKENTRY AS salentry ON sal.FID = salentry.FID INNER JOIN
dbo.T_SAL_OUTSTOCKENTRY_F AS salprice ON salprice.FENTRYID = salentry.FENTRYID INNER JOIN
dbo.v_bd_xzg_CUSTOMER AS cu ON cu.FCUSTID = sal.FCUSTOMERID INNER JOIN
dbo.v_BAS_xzg_BILLTYPE AS bill ON bill.FBILLTYPEID = sal.FBILLTYPEID INNER JOIN
dbo.v_ORG_xzg_ORGANIZATIONS AS org ON org.FORGID = sal.FSALEORGID INNER JOIN
dbo.V_BD_XZG_OPERATORENTRY AS oper ON oper.FENTRYID = sal.FSALESMANID INNER JOIN
dbo.v_T_BD_XZG_MATERIAL AS ma ON ma.FMATERIALID = salentry.FMATERIALID INNER JOIN
dbo.T_BD_STOCK_L AS st ON st.FSTOCKID = salentry.FSTOCKID INNER JOIN
dbo.T_BD_UNIT_L AS un ON un.FUNITID = salentry.FBASEUNITID