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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Date data type

RE: Date data type

From: Richard Ji <richard.ji_at_mobilespring.com>
Date: Tue, 14 Jan 2003 22:13:36 -0800
Message-ID: <F001.0053004E.20030114221336@fatcity.com>


Your between is the same as:

where dt >= '01-DEC-02' and dt <= '31-DEC-02'

and since '31-DEC-02' is '31-DEC-02 00:00:00', you are excluding records after '31-DEC-02 00:00:00'. Hence less records are returned.

-----Original Message-----
Sent: Tuesday, January 14, 2003 11:49 PM To: Multiple recipients of list ORACLE-L

Hi Listers,

    Does the date data type is not consistence on oracleDB ? I have the query below :

Create table test (dt date,

                            name varchar230));

SQL > Select * from test where dt between '01-DEC-02' and '31-DEC-02' - it returns 22 rows selected

SQL > Select * from test where to_char(dt,'mmrr')='1202' - it returns 26 rows selected

Why the last query return more rows selected than first query ? All comment would be appreciated.

TIA, Sony
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Sony kristanto
  INET: Sony_at_polyfincanggih.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Richard Ji
  INET: richard.ji_at_mobilespring.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jan 15 2003 - 00:13:36 CST

Original text of this message

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