会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
专注Oracle EBS
生命不息,奋斗不止
管理
SQL 语句优化 案例1
Code
1
select
count
(
1
)
2
into
l_line_num
--
l_number_of_day
3
from
hek_om_pop_validity_all
4
where
inventory_item_id
=
l_item_id
5
and
((start_date
<=
sysdate
6
and
end_date
>=
sysdate)
7
or
(start_date
<=
sysdate
and
end_date
is
null
));
修改后:
Code
1
select
count
(
1
)
2
into
l_line_num
--
l_number_of_day
3
from
hek_om_pop_validity_all
4
where
inventory_item_id
=
l_item_id
5
and
start_date
<=
sysdate
6
and
nvl(end_date, sysdate
+
1
)
>=
sysdate;
成长
/ | \
学习 总结 分享
QQ交流群:122230156
posted @
2009-09-29 09:26
郭振斌
阅读(
339
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告