在VB.net中的'by'运算符后显示缺少的操作数 [英] Showing Missing operand after 'by' operator in VB.net

查看:340
本文介绍了在VB.net中的'by'运算符后显示缺少的操作数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用

ds.Tables(0).Compute(sum(Quantity),group by ORI_No)

to group and sum Quantity

然后

显示错误



'by'运算符后缺少操作数



plz帮助我....

when i used
ds.Tables(0).Compute("sum(Quantity)", "group by ORI_No")
to group and sum Quantity
then
it is showing error

Missing operand after 'by' operator

plz help me....

推荐答案

第二个字符串参数用于过滤行,而不是用于分组。看看 DataTable.Compute [ ^ ]



如果你想对结果进行分组,我建议使用LINQ。
The second string parameter is used for filtering rows, not for grouping. Have a look at DataTable.Compute[^]

If you want to group the results, I would suggest using LINQ.


这篇关于在VB.net中的'by'运算符后显示缺少的操作数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆