给你看个例子:
<%
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from myjiejing where MyHuoZai_ID='" & cstr(request("id")) & "' and thechange=0 and ",conn,1,1
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from mycucedan where MyHuoZai_ID='" & cstr(request("id")) & "' and thechange=0",conn,1,1
set rs3=server.createobject("adodb.recordset")
m=rs1.recordcount+rs2.recordcount
e=rs1.recordcount
u=rs2.recordcount
redim scroe(m,5)
for i=1 to e
scroe(i,1)=rs1("id")
scroe(i,2)=rs1("thetime")
scroe(i,3)="接警"
scroe(i,4)="<a href='jjshow.asp?id="&scroe(i,1)&"&type=j'><font color='#FF0000'>电话号码:"&rs1("telno")&"...</a>"
scroe(i,5)="<a href='jjshow2.asp?id="&scroe(i,1)&"&type=j'><u>查看</u></a>"
rs1.movenext
next
for i=e+1 to m
scroe(i,1)=rs2("id")
scroe(i,2)=rs2("gotime")
scroe(i,3)="出车单"
scroe(i,4)="<a href='ccshow.asp?id="&scroe(i,1)&"&type=c'><font color='#FF0000'>出动车辆数量:"&rs2("HowCar")&"...</a>"
scroe(i,5)="<a href='ccshow2.asp?id="&scroe(i,1)&"&type=c'><u>查看</u></a>"
rs2.movenext
next
'for i=1 to m
'for j=1 to 3
' response.write scroe(i,j)&" "
' next
'Response.Write "<br>"
'next
'response.end
for i=1 to m-1
for j=i+1 to m
if scroe(i,2)>scroe(j,2) then
for k=1 to 5
x=scroe(j,k)
scroe(j,k)=scroe(i,k)
scroe(i,k)=x
next
end if
next
next
%>