sql%rowcount 为零??
来源:互联网 发布:iphone日历记事本软件 编辑:程序博客网 时间:2024/06/03 02:37
begin
starttime:=sysdate;
v_maxtime := to_date('9999-12-31 00:00:00','yyyy-mm-dd hh24:mi:ss');
select max(f_logintime) into v_maxtime from t_gather_userloginlog;
if v_maxtime != to_date('9999-12-31 00:00:00','yyyy-mm-dd hh24:mi:ss') then
insert into t_gather_userloginlog (f_userid,f_username,f_logintime,f_userip,f_loginflag,f_logintype) --来源主网登陆的。
select f_uid,f_username,f_logintime,f_ip,f_flag,f_type from t_webloginlog_bak@link_stdby w where w.f_logintime > v_maxtime;
insert into t_gather_userloginlog (f_userid,f_username,f_logintime,f_userip) --来源其他地方登陆。
select ui_id,ui_username,ui_lasttime,ui_lastip
from b_expuserinfo@link_stdby inner join t_webloginlog_bak@link_stdby
on ui_username = f_username and ui_lastip = f_ip and f_logintime=ui_lasttime and f_logintime > v_maxtime
where f_username is null and ui_lasttime > v_maxtime;
end if;
rownumber := sql%rowcount;
insert into t_base_sp_runlog values('gather','p_Gather_Day_i_UserLoginLog02',sysdate,'成功','INSERT', rownumber,round((dbms_utility.get_time-l_start)/100,2),starttime);
commit;
跑了很多天日志记录该过程影响行数为0! 不可能没有用户登陆啊
经过一番查证后:
insert into t_gather_userloginlog (f_userid,f_username,f_logintime,f_userip,f_loginflag,f_logintype) --来源主网登陆的。
select f_uid,f_username,f_logintime,f_ip,f_flag,f_type from t_webloginlog_bak@link_stdby w where w.f_logintime > v_maxtime;
rownumber := sql%rowcount;--这里有数据
insert into t_gather_userloginlog (f_userid,f_username,f_logintime,f_userip) --来源其他地方登陆。
select ui_id,ui_username,ui_lasttime,ui_lastip
from b_expuserinfo@link_stdby inner join t_webloginlog_bak@link_stdby
on ui_username = f_username and ui_lastip = f_ip and f_logintime=ui_lasttime and f_logintime > v_maxtime
where f_username is null and ui_lasttime > v_maxtime;
rownumber := sql%rowcount; --在这里变量被清空了
end if;
- sql%rowcount 为零??
- SQL%ROWCOUNT
- sql%rowcount
- sql%rowcount
- sql%rowcount
- huawei--循环,SQL%ROWCOUNT为0控制结束
- SQL中的sql%rowcount
- @@ROWCOUNT (Transact-SQL)
- SQL 之 Set Rowcount
- ORACLE中的SQL%ROWCOUNT
- SQL中@@ROWCOUNT函数
- oracle中的sql%rowcount
- SQL中@@ROWCOUNT函数
- oracle中的sql%rowcount
- oracle中的sql%rowcount
- oracle中的sql%rowcount
- sql set rowcount
- ORACLE中的SQL%ROWCOUNT
- JAVA中的向下转型(downcasting)及泛型与向上转型(upcasting)及RTTI、反射机制
- 掌握JDK是学好Java的第一步
- 条款06:若不想使用编译器自动生成的函数,就该明确拒绝.
- 麻烦的PB打印函数
- ASP.ENT 中文提交后变成??
- sql%rowcount 为零??
- iSkoot for skype
- Lucene学习笔记之创建Index
- GenSQLFromExcel--DirList
- Jtemplete/客户端模板的脚本渲染引擎
- 关于SEH学习的一些笔记
- Oracle 作业Job 无法停止下来---最后....
- 测试用例设计白皮书--等价类划分方法
- Java Socket网络编程初级入门[zz]