0
点赞
收藏
分享

微信扫一扫

Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifi


Syntax error in aggregate argument: Expecting a single column argument with possible

在对DataTable操作的时候,会引起 Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifi 这个错误。

原因是因为,在计算的时候,这个表的列名是一个 数字。所以,在执行运算的时候,就忽略列了。只有加[] 中括号,来进行定义它是一个列

var AVG = dttemp.Compute($"Avg([{id}])", "true").ToString();
var SUM = dttemp.Compute($"SUM([{id}])", "true").ToString();
var Max = dttemp.Compute($"Max([{id}])", "true").ToString();
var Min = dttemp.Compute($"Min([{id}])", "true").ToString();

 

以上是测试正常的 方法。

举报

相关推荐

0 条评论