问题现象: |
以数量作为分组条件,发现过滤出的查询结果错误。 跟踪语句发现 SELECT max([单据编号]) as [单据编号],max([日期]) as [日期],max([审核人]) as [审核人],max([部门名称]) as [部门名称],max([业务员]) as [业务员],max([客户名称]) as [客户名称],[数量],sum([本币无税金额]) as [本币无税金额],sum([本币税额]) as [本币税额],sum([本币价税合计]) as [本币价税合计],sum([本币折扣额]) as [本币折扣额],max([仓库名称]) as [仓库名称],max([存货名称]) as [存货名称],max([规格型号]) as [规格型号],max([DLID]) as [DLID] Into tempdb..TMPUF_5182032_heronGroup83_TANGHANZE FROM tempdb..TMPUF_5182032_heron83_TANGHANZE GROUP BY [数量] 以上是销售管理运行时的语句 其中[数量],应修改为sum([数量]) as [数量] 我应在何处修改 |