Dim b As New sqlGroupTableBuilder("统计表1","表A") b.Groups.AddDef("周龄") b.Totals.AddExp("累计","iif(天数 mod 7 = 0,数量,0)") Tables("窗口1_table1").DataSource = b.BuildDataSource
-- 作者:wyz20130512
-- 发布时间:2016/12/27 21:10:00
--
此主题相关图片如下:行集合4.png
-- 作者:fjlclxj
-- 发布时间:2016/12/27 22:01:00
--
方式1
Dim cmd As new S QLCommand cmd.C ommandText="s elect 天数,周龄,数量 from {表A} where [天数] mod 7 = 0" Tables("窗口1_Table1").DataSource =cmd.ExecuteReader
Dim cmd As new S QLCommand cmd.C ommandText="s elect 天数,周龄,数量 from {表A} where [天数] in (s elect max(天数) from {表A} group by 周龄)" Tables("窗口1_Table1").DataSource =cmd.ExecuteReader