Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SELECT BETWEEN Dates

Re: SELECT BETWEEN Dates

From: Sunil Natraj <sunilnatraj_at_rediffmail.com>
Date: 11 Aug 1999 11:01:00 -0500
Message-ID: <37b1902c@discussions>

Try using this SQL

select * from [table] where to_date(to_char(rev_date,'dd-mon- yyyy'),'dd-mon-yyyy')
between to_date('11-Aug-1999','dd-mon-yyyy') and to_date('11-Aug- 1999','dd-mon-yyyy')

Sunil

"Eamonn Keating" <oristech_at_tinet.ie> wrote:
>On the oracle database the following statement will not
retrieve any rows
>SELECT PartCode,SPEC_REV_NO, to_char

(CHANGE_DATE_TIME,'dd/Mon/yyyy
>hh24:mi:ss'), to_char(REV_DATE,'dd/Mon/yyyy'),Userid,Comments
FROM SPECAUD
>WHERE REV_DATE BETWEEN to_date( '11-Aug-1999' , 'dd-mon-yyyy')
AND
>o_date( '11-Aug-1999' , 'dd-mon-yyyy')
>
>wheras the following will
>
>SELECT PartCode,SPEC_REV_NO, to_char

(CHANGE_DATE_TIME,'dd/Mon/yyyy
>hh24:mi:ss'), to_char(REV_DATE,'dd/Mon/yyyy'),Userid,Comments
FROM SPECAUD
>WHERE REV_DATE BETWEEN to_date( '11-Aug-1999' , 'dd-mon-yyyy')
AND
>o_date( '12-Aug-1999' , 'dd-mon-yyyy')
>
>for data on 11-Aug-1999 ?
>any help would be appreciated
>
>Regards
>Eamonn
>
>
Received on Wed Aug 11 1999 - 11:01:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US