asp 历年数字统计

来源:百度知道 编辑:UC知道 时间:2024/05/16 17:36:33
我想从一下代码里面加入这个exec="Select * from 070809 where yljg='"&xzyljg&"' and bcsj>#2009-1-1# and bcsj<#2010-1-1# "
用来读联2009全年的数据。
初学者,请帮忙。

<!--#include file="conn.asp" -->
<html>
<%
xzyljg=request("xzyljg")
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>范县人民医院2007-2010年住院分析表</title>
</head>

<body>
<%
exec="Select * from 070809 where yljg='"&xzyljg&"' and bcsj<#2008-1-1# "
'response.write exec
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<table border="1" id="table1">
<tr>
<td colspan="21" align="center&

楼主你实际上是整个查询条件弄错了,以下是我修改的,你看看行不行!我没有环境做测试,你自己测试一下,如果有问题,可以HI我!

<!--#include file="conn.asp" -->
<html>
<%
xzyljg=request("xzyljg")
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>范县人民医院2007-2010年住院分析表</title>
</head>

<body>

<table border="1" id="table1">
<tr>
<td colspan="21" align="center">
<p align="center"><%=rs("yljg")%>2007-2010年住院分析表</td>
</tr>
<tr>
<td align="center"> </td>
<td colspan="5" align="center">2007年</td>
<td colspan="5" align="center">2008年</t