或者是怎么判断两个时间段中的时间是不是整点呢
解决方案 »
- 服务器重装-oracle没备份-只拷贝了oracle安装目录-可以恢复数据吗
- 关于计算一个时间段内的存储过程的请教
- 帮忙给看一个java访问oracle的错误
- ORACLE_SID、SERVICE_NAME直接的区别与联系
- 怎样判断一个表空间是否回滚表空间?
- ASP.NET+C#+ORACLE过程难题!!!!!!!
- 关于索引的问题,请各位老大指点下???
- 这个函数该怎么写
- 有没有什么ORACLE网站?
- 请问那位高手有如何在P4+windowXP下安装oracle的经验
- 【求助】关于存储过程中使用datalink连接超时问题
- oracle求助!!!!!!!!!!!第 6行出现错误: ora-02253: 此处不允许约束条件说明
from (select trunc(exittime, 'HH24') c_time
from (select exittime
from tmp_rawhour t1
where t1.rowid = (select max(rowid)
from tmp_rawhour t2
where t1.exittime = t2.exittime)
)
) count_time,
(select (min_time + (rownum - 1)/24) a_time,
rownum rn
from all_objects,
(select min(trunc(exittime, 'HH24')) min_time,
max(trunc(exittime, 'HH24')) max_time
from tmp_rawhour) loop_time
where rownum < = (max_time - min_time)*24 + 1) all_time
where a_time = c_time(+)tmp_rawhour是我的表,exittime是要得到的时间字段
(
select to_date('2015-05-16 07:20:49','yyyy-mm-dd hh24:mi:ss') max_time,
to_date('2015-01-21 08:30:00','yyyy-mm-dd hh24:mi:ss') min_time
from dual
)
select trunc(min_time,'hh24')+(1/24)*(level-1) dtime
from tmp
connect by level <= (trunc(max_time,'hh24') - trunc(min_time,'hh24')+1/24)*24
其中max_time和min_time为你指定的时间段.