求助,如何加双重条件输出结果呢? 在所选xb(县别),总投资又是大于10000的。
程序代码:
</tr> <tr> <td width="13%" rowspan="3" align="center" bgcolor="#FFFFFF">县区</td> <td width="8%" rowspan="3" align="center" bgcolor="#FFFFFF">总投资</td> <td width="8%" rowspan="3" align="center" bgcolor="#FFFFFF">项目<br> 个数</td> <td width="71%" colspan="10" align="center" bgcolor="#FFFFFF">分段统计</td> </tr> <tr> <td colspan="2" align="center" bgcolor="#FFFFFF">1亿元以下</td> <td colspan="2" align="center" bgcolor="#FFFFFF">1-10亿元</td> <td colspan="2" align="center" bgcolor="#FFFFFF">10-50亿元</td> <td colspan="2" align="center" bgcolor="#FFFFFF">50-100亿元</td> <td colspan="2" align="center" bgcolor="#FFFFFF">100亿元以上</td> </tr> <tr> <td align="center" bgcolor="#FFFFFF">总投资</td> <td align="center" bgcolor="#FFFFFF">项目<br> 个数</td> <td align="center" bgcolor="#FFFFFF">总投资</td> <td align="center" bgcolor="#FFFFFF">项目<br> 个数</td> <td align="center" bgcolor="#FFFFFF">总投资</td> <td align="center" bgcolor="#FFFFFF">项目<br> 个数</td> <td align="center" bgcolor="#FFFFFF">总投资</td> <td align="center" bgcolor="#FFFFFF">项目<br> 个数</td> <td align="center" bgcolor="#FFFFFF">总投资</td> <td align="center" bgcolor="#FFFFFF">项目<br> 个数</td> </tr> <tr> <td align="center" bgcolor="#E9FFCA"><strong>合计</strong></td> <td align="center" bgcolor="#E9FFCA"><div align="center"><strong><%=Formatnumber(sums("ztz","all"),-1,-1,-1,0)%></strong></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><strong><%=allr("all")%></strong></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=formatnumber(sums("ztz","ztz<10000"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz<10000")%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=formatnumber(sums("ztz","ztz>=10000 and ztz<100000"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=10000 and ztz<100000")%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=Formatnumber(sums("ztz","ztz>=100000 and ztz<500000"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=100000 and ztz<500000")%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=Formatnumber(sums("ztz","ztz>=500000 and ztz<1000000"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=500000 and ztz<1000000")%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=formatnumber(sums("ztz","ztz>=1000000"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=1000000")%></div></td> </tr> <%set rss=server.CreateObject("adodb.recordset") rss.open "select * from project where ztz>=1000000",conn,1,1 %><% rss.close%> <%set rss=server.CreateObject("adodb.recordset") rss.open "select * from project where ztz>=500000 and ztz<1000000",conn,1,1 %><% rss.close%> <%set rss=server.CreateObject("adodb.recordset") rss.open "select * from project where ztz>=100000 and ztz<500000",conn,1,1 %><% rss.close%> <%set rss=server.CreateObject("adodb.recordset") rss.open "select * from project where ztz>=10000 and ztz<100000",conn,1,1 %><% rss.close%><%set rss=server.CreateObject("adodb.recordset") rss.open "select * from project where ztz<10000",conn,1,1 %><% rss.close%> <%set rss=server.CreateObject("adodb.recordset") rss.open "select distinct xb from project",conn,1,1 do until rss.eof%> <tr> <td align="center" bgcolor="#FFFFFF"><%=rss("xb")%></td> <td align="center" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("xb='"&rss("xb")&"'")%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz<10000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz<10000","xb='"&rss("xb")&"'")%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=10000 and ztz<100000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=10000 and ztz<100000","xb='"&rss("xb")&"'")%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=100000 and ztz<500000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=100000 and ztz<500000","xb='"&rss("xb")&"'")%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=500000 and ztz<1000000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=500000 and ztz<1000000","xb='"&rss("xb")&"'")%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=1000000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td> <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=1000000","xb='"&rss("xb")&"'")%></div></td> </tr> <%rss.movenext loop rss.close%> <tr> <td colspan="13" align="right" bgcolor="#E9FFCA">【<a href="javascript:window.print();">打印</a>】 【<a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a>】 【<a href="Javascript:history.back('1')">后退</a>】 【<a href="Javascript:history.back('-1')">前进</a>】 【<a href="javascript:window.close()">关闭</a>】 【<a href="javascript:history.go('0')">刷新</a>】 【<a href="main.asp">返回首页</a>】</td> </tr> </table> </body> </html>源代码 如上,在红色的部分,是我加了条件后,不知道该怎么再增加语句了, 能得到想要的条件。。。
如图