select *
from table
group by a,b,c
order by a,b,c
现在不单单是看看查询结果,把select出来的结果放到一个二维数组里。我现在要把不同的group输出到不同的excel sheet,那么怎么区分group呢?我是指通过循环比较数组里的值。
from table
group by a,b,c
order by a,b,c
现在不单单是看看查询结果,把select出来的结果放到一个二维数组里。我现在要把不同的group输出到不同的excel sheet,那么怎么区分group呢?我是指通过循环比较数组里的值。
解决方案 »
- 锁定键盘问题????
- 4万行的VB,编译时提示:“编译错误:过程太大”:
- 运行时错误'91':
- 求救!!急!在线等待
- 请问谁有Visual Basic 6.0游戏编程50讲的光盘资料?
- 打印页数问题?
- 我用ADO挂的DATAGRID我想让用户可以直接同过这个GRID修改库,但是只可以增加,修改的都存不回去呀
- 跪求Office VBA 问题。英语好的请进。在线等好心人解答
- 关于Excel对象的使用
- 我应该怎么做一个类似的东西??为什么我只能给20分!!!!
- 如何在打开IE的时候自动启动其他程序,在关闭IE的时候一同关闭?
- ********************用inet1模拟html的post提交,上传文件流到服务器,服务端程序是servlet,文上得到流失败!!
1
set rs1 = cnn.execute("select distinct a,b,c from table order by a,b,c")2
do until rs1.eof
set rs2 = cnn.execute("select * form table where a=" & rs1!a & " and b=" & rs1!b & " and c=" & rs1!c
......
rs1.movenext
loop
入学生的分数
a->表示学生的分数级别,如A、B、C
b->表示学生的分数次级别,如A1,A2,A3
c->表示学生的实际分数,范围在0->100
实际上,你在查询的是否已经可以按顺序将需要的数据查出来了,为什么还要循环呢?
dim a as string,b as string,c as string
rst.open "select * from table group by a,b,c order by a,b,c",cnn,3,1
a = rst!a & "1"
b = rst!b & "1"
c = rst!c & "1"
do while not rst.eof
if a <> rst!a or b <> rst!b or c <> rst!c then
'写入新的sheet
else
'写入刚才写入的sheet
end if
rst.movenext
a = rst!a
b = rst!b
c = rst!c
loop
rst.close