设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 64|回复: 1
打印 上一主题 下一主题

cz(i)=rs3("RZSL)-rs2("RZSL") 此处不计算

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-19 01:24:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<%on error resume next
dim b(600),jh1(600),jingh(600),dbb(600),riqii(600),shij(600),dymcc(600),cengw(600),gany(600),youy(600),taoy(600),peiz(600),shiz(600),cds(600),beiz(600),qsz(600),cz(600)
dim riqi1,riqi2,pz,shz,js,bd1,bd2
bd1=request.form("db1")
bd2=request.form("db2")
y1=request.form("year1")
m1=request.form("month1")
d1=request.form("day1")
y2=request.form("year2")
m2=request.form("month2")
d2=request.form("day2")
riqi1=y1&m1&d1
riqi2=y2&m2&d2
%>
<%
'取井号
exec1="select distinct JH from YS_DBA02 where (DWDM like '3020046%' or DWDM like '3020047%') order by JH"
Set RS1= Server.CreateObject("ADODB.RecordSet")
rs1.Open exec1,Connc,1,2
i=0
do while not rs1.eof
if rs1("JH")<>"" and rs1("JH")<>"0" then
jh1(i)=rs1("JH").value
i=i+1
end if
rs1.movenext
loop
rs1.close
set rs1=nothing

numb=i

i=0
for j=0 to numb-1

exec2="select rzsl from YS_DBA02 where JH='"&jh1(j)&"' and (DWDM like '3020046%' or DWDM like '3020047%') and to_char(rq,'yyyymmdd')='"&riqi1&"'"
Set RS2= Server.CreateObject("ADODB.RecordSet")
rs2.Open exec2,Connc,1,2


exec3="select * from YS_DBA02 where JH='"&jh1(j)&"' and (DWDM like '3020046%' or DWDM like '3020047%') and to_char(rq,'yyyymmdd')='"&riqi2&"'"
Set RS3= Server.CreateObject("ADODB.RecordSet")
rs3.Open exec3,Connc,1,2

if not rs2.eof then
if not rs3.eof then
if Abs(rs3("RZSL")-rs2("RZSL"))>=bd1 and Abs(rs3("RZSL")-rs2("RZSL"))<bd2 then
i=i+1
jingh(i)=rs3("JH").value
dbb(i)=rs3("DWMC").value
riqii(i)=rs3("RQ").value
shij(i)=rs3("SCSJ").value
dymcc(i)=rs3("DYMC").value
cengw(i)=rs3("ZSCW").value
gany(i)=rs3("GXYL").value
youy(i)=rs3("YY").value
taoy(i)=rs3("TY").value
peiz(i)=rs3("RPZSL").value
shiz(i)=rs3("RZSL").value
cds(i)=rs3("PZCDS").value

if rs3("BZ").value<>"" then
beiz(i)=rs3("BZ").value
else
beiz(i)="无"
end if
qsz(i)=rs2("RZSL").value
cz(i)=rs3("RZSL)-rs2("RZSL") 此处不计算
end if
end if
end if
next
num=i
rs2.close
set rs2=nothing
rs3.close
set rs3=nothing
connc.close
set connc=nothing
%>
问题是:
cz(i)=rs3("RZSL)-rs2("RZSL") 此处不计算
这是用asp编的调用的是oracle数据库的number类型数据,我用类型转换函数CSng,formatnumber都不行。
请高手赐教
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-19 00:31 , Processed in 0.066380 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表