update TEMP_FACILITY_MITIGATION_INFO f
set f.DebtorRatingGrade = nvl((select r.RatingGrade99
from rating_record_pd_corporate r
where r.customerid = f.customerid
and (SUBSTR(r.ApproveTime, 0, 10) <=
f.recorddate and
(SUBSTR(r.InvalidDate, 0, 10) >
f.recorddate or
r.InvalidDate is null))
and r.procstatus = '40'
and rownum = 1),
'E')
where f.SendingOrg = '11111111111111111111111111111111'
and f.RecordDate = '2010-09-30'
and f.sendingdate = '2010-12-14 10:07:35';说明:TEMP_FACILITY_MITIGATION_INFO 表要更新的记录有2000条
rating_record_pd_corporate 表里记录有一千多条
set f.DebtorRatingGrade = nvl((select r.RatingGrade99
from rating_record_pd_corporate r
where r.customerid = f.customerid
and (SUBSTR(r.ApproveTime, 0, 10) <=
f.recorddate and
(SUBSTR(r.InvalidDate, 0, 10) >
f.recorddate or
r.InvalidDate is null))
and r.procstatus = '40'
and rownum = 1),
'E')
where f.SendingOrg = '11111111111111111111111111111111'
and f.RecordDate = '2010-09-30'
and f.sendingdate = '2010-12-14 10:07:35';说明:TEMP_FACILITY_MITIGATION_INFO 表要更新的记录有2000条
rating_record_pd_corporate 表里记录有一千多条
解决方案 »
- 如何根据数据形态来进行分析预测?
- Oracle的锁和MS-sql的锁的区别
- 存储过程中无法访问其他数据库数据
- insert into 的时候要插入的变量里面含有很多字符,如:',",\ 等等应该怎么写?
- 我建了oemrep关机后再进入,就不行了,为什么?
- oracle9i登陆问题以normal不能登陆,以sysdba能登陆。
- 如何购买oracle,请大家帮帮我。
- proc*c能查询视图么???
- ORACLE中有关时间数据在查询(急在线等待,请高手帮忙)
- PROC问题:在proc程序中通过database link 往另外的库中insert时没反应,但在sqlplus中手工插入可以
- 计算问题,如何优化?
- 如何查看我目前用的数据库类型是什么?
对你表rating_record_pd_corporate的customerid、procstatus加上索引呢,再对 ApproveTime、InvalidDate 加上一个函数索引