纸盒箱做手工制作大全:会ASP和SQL的人请进!

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 22:54:52
请把以下SQL 查询分析器语句转成ASP,谢谢,
select *
from CallNoUser
where startdate>'2006-07-02' and groupNo<>'softphe'
order by GroupNo
compute sum(ThisTime) by groupNo
包括输出这段查询内容的时候怎么输出!!!!

<%
<!--#include file="conn.asp"-->
dim rs
set rs=server.createobject("adodb.recordset")
rs.open"select * from CallNoUser where startdate>'2006-07-02' and groupNo<>'softphe' order by GroupNo compute sum(ThisTime) by groupNo ",conn,1,1
if rs.eof then
response.write("<script language="javascript">window.alert('数据库中无数据!');history.go(-1)</script>")
else
%>
<htm>
<head>
<title>显示查询结果</title>
</head>
<body>
<table border="1">
<tr>
<td>表字段1</td>
<td>表字段2</td>
<td>表字段3</td>
<td>表字段4</td>
<td>表字段5</td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td><%=rs("表字段1")%></td>
<td><%=rs("表字段2")%></</td>
<td><%=rs("表字段3")%></</td>
<td><%=rs("表字段4")%></</td>
<td><%=rs("表字段5")%></</td>
</tr>
<%
rs.movenext
loop
%>
</table>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
注意:分页自己做了,我没有测试,可能会有错误!你检查下,我发现好象你的SQL语句有问题!!