如何ASP提取记录集保存到数组中
如:sql="SELECTsum(h1),sum(h2),sum(h3),sum(h4),sum(h5),sum(h6),sum(h7),sum(h8),sum(h9),...
如:sql="SELECT sum(h1),sum(h2),sum(h3),sum(h4),sum(h5),sum(h6),sum(h7),sum(h8),sum(h9),sum(h10),sum(h11),sum(h12),sum(h13),sum(h14),sum(h15),sum(h16),sum(h17),sum(h18),sum(h19),sum(h20),sum(h21),sum(h22),sum(h23),sum(h24) FROM tateltime WHERE tDay = '2006-5-17' and s.id='102'"
把这个要提取的值,sum(h1)....sum(h24)保存在一个数组里,然后通过读取数组的值进行调用? 展开
把这个要提取的值,sum(h1)....sum(h24)保存在一个数组里,然后通过读取数组的值进行调用? 展开
展开全部
dim arr,i,sql
sql="SELECT sum(h1),sum(h2),sum(h3),sum(h4),sum(h5),sum(h6),sum(h7),sum(h8),sum(h9),sum(h10),sum(h11),sum(h12),sum(h13),sum(h14),sum(h15),sum(h16),sum(h17),sum(h18),sum(h19),sum(h20),sum(h21),sum(h22),sum(h23),sum(h24) FROM tateltime WHERE tDay = '2006-5-17' and s.id='102'"
set arr =conn.execute(sql)
for i = 0 to 23
response.write "sum(h"&i+1&") = "&arr(i)
next
试试
sql="SELECT sum(h1),sum(h2),sum(h3),sum(h4),sum(h5),sum(h6),sum(h7),sum(h8),sum(h9),sum(h10),sum(h11),sum(h12),sum(h13),sum(h14),sum(h15),sum(h16),sum(h17),sum(h18),sum(h19),sum(h20),sum(h21),sum(h22),sum(h23),sum(h24) FROM tateltime WHERE tDay = '2006-5-17' and s.id='102'"
set arr =conn.execute(sql)
for i = 0 to 23
response.write "sum(h"&i+1&") = "&arr(i)
next
试试
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询