以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 请教group by问题! (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=48516) |
-- 作者:苍风霁月 -- 发布时间:2014/3/31 10:02:00 -- 请教group by问题! sqlcommand语句如下: cmd.CommandText =“SELECT DISTINCT 复审,count(复审) As 审核量 From {原始数据} where 复审 Is not null and 处理状态 in (\'0\',\'4\',\'2\') and 复审<>\'未分配\' group by 复审”
我用sqlcommand查询方式, 返回多个值,如何逐行按group by 的字段取值? |
-- 作者:狐狸爸爸 -- 发布时间:2014/3/31 10:13:00 -- dim dt As DataTable dt = cmd.ExecuteReader() for each dr as datarw in dt.datarows output.show(dr("复审") & ":" & dr("审核量")) next |
-- 作者:苍风霁月 -- 发布时间:2014/3/31 10:23:00 -- 已搞定,非常感谢! |