用两个循环来写吧,试试这样
<%
set rs =Server.CreateObject("adodb.recordset")
sql ="select * from [tb]"
rs.open sql,conn,1,1
if not (rs.eof and rs.bof) then
%>
<Table>
<Tr>
<%
do while not rs.eof
%>
<td><%=rs("aa")%><td>
<td>
<%
set rs1 =Server.CreateObject("adodb.recordset")
sql1 ="select * from [tb] where vv='" & rs("vv") &"'"
rs1.open sql1,conn,1,1
if not (rs1.eof and rs1.bof) then
do while not rs1.eof
%>
<%=rs1("vv")%><BR>
<%
rs1.movenext
loop
rs1.close
set rs1=nothin
end if
%>
</td>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if
%>
</tr>
</table>