SQL Server SUM GROUP BY 返回错误答案
SELECTje.CompanyCode,je.ItemId,je.DocId,SUM(tb.DebitEOY+tb.CreditEOY)--为什么该列返回值会是期望值5...
SELECT je.CompanyCode
,je.ItemId
,je.DocId
,SUM(tb.DebitEOY + tb.CreditEOY) --为什么该列返回值会是期望值5倍?
FROM dbo.JE je
,dbo.TB tb
,(select *
from dbo.JE j
where j.DateOfDoc between @Yr + '-10-01' and @Yr + '-12-31') je3
WHERE je.CompanyCode = tb.CompanyCode
AND je.ItemId = tb.ItemId
AND je.CompanyCode = je3.CompanyCode and je.ItemId = je3.ItemId
GROUP BY je.CompanyCode
,je.ItemId
,je.DocId
HAVING SUM(tb.DebitEOY + tb.CreditEOY) != 0
ORDER BY je.CompanyCode
,je.ItemId
,AgingAR3 展开
,je.ItemId
,je.DocId
,SUM(tb.DebitEOY + tb.CreditEOY) --为什么该列返回值会是期望值5倍?
FROM dbo.JE je
,dbo.TB tb
,(select *
from dbo.JE j
where j.DateOfDoc between @Yr + '-10-01' and @Yr + '-12-31') je3
WHERE je.CompanyCode = tb.CompanyCode
AND je.ItemId = tb.ItemId
AND je.CompanyCode = je3.CompanyCode and je.ItemId = je3.ItemId
GROUP BY je.CompanyCode
,je.ItemId
,je.DocId
HAVING SUM(tb.DebitEOY + tb.CreditEOY) != 0
ORDER BY je.CompanyCode
,je.ItemId
,AgingAR3 展开
1个回答
2016-06-27
展开全部
添加一个sScrollY属性
var height=$(window).height();
$(document).ready(function() {
$('#example').dataTable(
{
"sScrollY": height
});
var height=$(window).height();
$(document).ready(function() {
$('#example').dataTable(
{
"sScrollY": height
});
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询