SELECT * FROM sktxsjl 
where JYSJ between to_date('2013.6.2 09:10:48','yyyy.mm.dd hh24:mi:ss') and to_date('2013.6.3 10:10:48','yyyy.mm.dd hh24:mi:ss')  
sql

解决方案 »

  1.   

    oracle sql  我需求的是一个月每天9点到10点的业绩
      

  2.   

    oracle sql  我需求的是一个月每天9点到10点的业绩
      

  3.   

    --比如求6月份每天9点到10点的数据
    SELECT * FROM sktxsjl 
    where JYSJ between to_date('2013.06.01 00:00:00','yyyy.mm.dd hh24:mi:ss') and to_date('2013.06.30 23:59:59','yyyy.mm.dd hh24:mi:ss') 
    and to_date(JYSJ,'hh24:mi:ss')>='09:00:00'
    and to_date(JYSJ,'hh24:mi:ss')<='10:00:00'
      

  4.   


    SELECT * FROM sktxsjl 
     where to_char(JYSJ,'hh24')='09'
    and to_char(JYSJ,'mm')='06'