set rs=server.createobject("adodb.recordset")
sql="select A from table group by A"
rs.open sql,conn,1,1
do while not rs.eof
set rst=server.createobject("adodb.recordset")
sql="select * from table where A="& rs("A")
rst.open sql,conn,1,1
'输出所需内容
rst.close
set rst=nothing
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing