update my_rev_share_details_ntr2 a set a.revflag = 1 ,(a.entertime,a.exittime)=
(select b.entertime,b.exittime from stat_stay_june09 b where a.call_time between b.entertime and b.exittime and b.staycause in (1,2,3) and a.imsi = b.imsi )
where exists (select 1 from stat_stay_june09 b where a.call_time between b.entertime and b.exittime and b.staycause in (2,3) a.imsi = b.imsi);本句涉及个表 my_rev_share_details_ntr2 stat_stay_june09 里面都有上千万条数据
表 my_rev_share_details_ntr2 a 主要字段: revflag entertime exittime imsi
表 stat_stay_june09 b 主要字段: entertime exittime imsi staycause
现在我想把表a的三个字段更新 当满足 a.call_time between b.entertime and b.exittime and b.staycause in (2,3) a.imsi = b.imsi时
希望高手能帮我提高这个句的效率 把语句写出来 十分感谢
(select b.entertime,b.exittime from stat_stay_june09 b where a.call_time between b.entertime and b.exittime and b.staycause in (1,2,3) and a.imsi = b.imsi )
where exists (select 1 from stat_stay_june09 b where a.call_time between b.entertime and b.exittime and b.staycause in (2,3) a.imsi = b.imsi);本句涉及个表 my_rev_share_details_ntr2 stat_stay_june09 里面都有上千万条数据
表 my_rev_share_details_ntr2 a 主要字段: revflag entertime exittime imsi
表 stat_stay_june09 b 主要字段: entertime exittime imsi staycause
现在我想把表a的三个字段更新 当满足 a.call_time between b.entertime and b.exittime and b.staycause in (2,3) a.imsi = b.imsi时
希望高手能帮我提高这个句的效率 把语句写出来 十分感谢
解决方案 »
- 做回退到旧数据库副本的不完全恢复问题。
- 不能下载Oracle的数据库.
- 机械工业出版社出版
- 如何读出带有返回结果(为一个XML串)的ORACLE存储过程????
- 另类:linux下的oracle数据库如何到处到access。
- 急,在线等待,为什么oracle执行sql语句的速度比sql server速度还慢许多 ?具体请看文章内容,高手救急啊
- 据类型为number(15,5)浮点型,要求做到保密,怎么办?
- 我安装完oracle 8i之后 ,在登录OEM时管理员和口令怎么填?
- 请帮忙,紧急求救!!!
- linux/oracle shell script 问题
- ORACLE怎么把记录中间的空间去掉呢?
- 请教下这个需求如何更好的实现
update my_rev_share_details_ntr2 a set a.revflag = 1 ,(a.entertime,a.exittime)=
(select b.entertime,b.exittime from stat_stay_june09 b where a.call_time between b.entertime and b.exittime and b.staycause in (2,3) and a.imsi = b.imsi )