vb从sql得到五个数来进行排序
的有关信息介绍如下:<%Dim sql:sql="SELECT 班次名称,sum(燃料卸煤量) as xml FROM XZB_JZJX3 WHERE YEAR(日期)='"&years&"' AND MONTH(日期)='"&months&"' group by 班次名称 order by sum(燃料卸煤量) desc"set pa=conn.execute(sql)i=0jf=4.5dim mc()do while not pa.eofRedim Preserve mc(1,i)mc(0,i)=pa("sl")if ls<>pa("sl") then ls=pa("sl") if jf<>0 then jf=jf-1.5end ifmc(1,i)=jfi=i+1pa.movenextlooppa.closeset pa=nothingfor i=0 to ubound(mc,2)response.write mc(0,i)&" "response.write mc(1,i)&" "next%>