str="select * from table1"
set rs=ExcSql(str)
dim s,s1,i
i=1
do while not rs.eof
s=rs("score")
if (s=s0)and (s0<>"") then
i=i-1
response.write i&" "&s&"<br>"
else
response.write i&" "&s&"<br>"
end if
s0=s
i=i+1
rs.movext
loop
<!--#include file="conn.asp"-->
<%
sql ="SELECT id,fs FROM A " '//改表名就可,不关字段
Set rs = conn.execute(sql) '//打开
aResults = rs.GetRows '//取得数据集
iRows = UBound(aResults, 2) '//记录数
icols = UBound(aResults, 1) '//字段数
rs.close
set rs=nothing
%>
<%
L=1
response.write "<table border=0>"
for i=0 to iRows
response.write "<tr>"
response.write "<td>"&L&"</td><td>"&aResults(1,i)&"</td>"
If aResults(1,i)-aResults(1,i+1)<>0 then L=L+1
response.write "</tr>"
next
response.write "</table>"
%>