中粮福临门食用油价格:如何用ASP 编码
来源:百度文库 编辑:查人人中国名人网 时间:2024/05/03 08:03:16
表member中有字段A、B、C、D、E、F、G、H,
第一条记录EFGH为空,没有数据
第二条记录全部有数据
第三条记录GH没有数据,
…………
我想计算每一条记录有数据的个数,
比如第一条应该是4个,第二条8个,第三条5个,
该怎么编码。还有就是全部记录中有数据的个数!请高手指点
第一条记录EFGH为空,没有数据
第二条记录全部有数据
第三条记录GH没有数据,
…………
我想计算每一条记录有数据的个数,
比如第一条应该是4个,第二条8个,第三条5个,
该怎么编码。还有就是全部记录中有数据的个数!请高手指点
<%
'你的数据库链接语句放在这里
psql="select * from member"
rs.open psql,conn,3,3
total=0
i=1
do while not rs.eof
j=0
if not isnull(rs("A")) then j=j+1
if not isnull(rs("B")) then j=j+1
if not isnull(rs("C")) then j=j+1
if not isnull(rs("D")) then j=j+1
if not isnull(rs("E")) then j=j+1
if not isnull(rs("F")) then j=j+1
if not isnull(rs("G")) then j=j+1
if not isnull(rs("H")) then j=j+1
response.write("第"&i&"条记录有数据个数:"&j)
total=total+j
rs.movenext
loop
response.write("全部记录中有数据的个数:"&total)
%>