方式1
Dim cmd As new S QLCommand
cmd.C ommandText="s elect 天数,周龄,数量 from {表A} where [天数] mod 7 = 0"
Tables("窗口1_Table1").DataSource =cmd.ExecuteReader
-----------------------------------------------------------------------------
方式2
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
[此贴子已经被作者于2016/12/27 22:16:28编辑过]