我想要的是:
1、判断
2、求和
例如:
判断:表中的A、B、C三个字段中的值是否为空,为空则输入“0”;不为空则为:1
求和:通过判断再累计这三个字段的值例:1+0+1=2
我想要的是:
1、判断
2、求和
例如:
判断:表中的A、B、C三个字段中的值是否为空,为空则输入“0”;不为空则为:1
求和:通过判断再累计这三个字段的值例:1+0+1=2
set conn=server.create("adodb.connection")
conn.open "你的驱动字符串"
set rs=conn.execute("select a,b,c from yourtable")
if rs.eof or rs.bof then
response.write "无记录"
else
a=rs("a")&"":b=rs("b")&"":c=rs("c")&""
if a="" then
a=0
else
a=1
end if
if b="" then
b=0
else
b=1
end if
if c="" then
c=0
else
c=1
end if
resposne.write a+b+c
end if
rs.close:set rs=nothing
conn.close:set conn=nothing