oracle当天信息查询

麻烦问下,要求只查询当天9:00-21:00的信息。数据库是ORACLE
[b]问题补充:[/b]
先谢谢大家,补充下:
你们提供的方法我之前就写了,但是有问题。
我的语句:
select * from A where to_char(sysdate,'hh24:mi') between '09:00' and '21:00'

这样查出来的记录有问题,检索出的记录包括了 所有9:00-21:00的信息,比如(2009-7-1 9:41分的记录)

[quote]select * from A where to_char(sysdate,'hh24:mi') between '09:00' and '21:00' [/quote]
我这个只判断时间段...你A表有没有时间字段,有的话可以这样..
select * from A where to_char(sysdate,'hh24:mi') between '09:00' and '21:00' where to_char(A.time,'yyyy-MM-dd)=to_char(sysdate,'yyyy-MM-dd);
没有的话..试试楼上的..应该可以

[code="sql"]select * from fnd_user a where to_char(a.last_update_date,'HH:mm') between '9:00' and '21:00' [/code]

先得到当前日期嘛,再构造条件就行啊

[quote]select * from fnd_user a where to_char(a.last_update_date,[color=red]'HH:mm'[/color]) between '9:00' and '21:00' [/quote]

ORACLE 24小时制我记得是hh24,不知道HH行不行..
另外当天可以用sysdate

select * from dual where to_char(sysdate,'hh24:mi') between '9:00' and '21:00'

:x 试试这个.

[code="sql"]select * from A where to_char(sysdate,'yyyy-mm-dd hh24:mi') between to_char(sysdate,'yyyy-mm-dd')||' 09:00' and to_char(sysdate,'yyyy-mm-dd')||' 21:00' [/code]