关于动态表的操作,可以参考
http://community.csdn.net/Expert/topic/3405/3405995.xml?temp=.4863397关于你上面的过程,temptable_sj应该是你自己建的一个表/.
(ri in date default sysdate) ---->sysdate是系统日期.得到的将是2004-9-25 11:35:06这样的格式,精确到秒的.而你的查询select jh,rq from dba02 where rq=ri;得到的将是你查询那一秒的数据,应该不会有数据的,所以把你的游标查询修改一下,成下面的样子,就可以查询得到今天的数据了:
select jh,rq from dba02 where to_char(rq,'yyyy-mm-dd')=to_char(ri,'yyy-mm-dd');
http://community.csdn.net/Expert/topic/3405/3405995.xml?temp=.4863397关于你上面的过程,temptable_sj应该是你自己建的一个表/.
(ri in date default sysdate) ---->sysdate是系统日期.得到的将是2004-9-25 11:35:06这样的格式,精确到秒的.而你的查询select jh,rq from dba02 where rq=ri;得到的将是你查询那一秒的数据,应该不会有数据的,所以把你的游标查询修改一下,成下面的样子,就可以查询得到今天的数据了:
select jh,rq from dba02 where to_char(rq,'yyyy-mm-dd')=to_char(ri,'yyy-mm-dd');
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货