home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.oracle
- Path: sparky!uunet!timbuk.cray.com!hemlock.cray.com!cherry13!mike
- From: mike@cray.com (Mike Carney)
- Subject: Re: Question using BETWEEN/AND cond with NEXT_D
- Message-ID: <1992Dec22.140443.18742@hemlock.cray.com>
- Lines: 22
- Nntp-Posting-Host: cherry13
- Reply-To: mike@cray.com
- Organization: Cray Research, Inc.
- References: <echoy.724882423@cunews>
- Date: 22 Dec 92 14:04:43 CST
-
- You have to be careful using date/time fields with the BETWEEN/AND operator.
- The date field may contain time as well as the date -- sysdate for example
- has both a date and a time component. The trunc function can be used to
- remove the time component. Example:
-
- SQL> select 'ok' from dual where sysdate = '22-dec-92';
-
- no rows selected
-
- SQL> select 'ok' from dual where trunc(sysdate) = '22-dec-92';
-
- 'O
- --
- ok
-
-
- ---
-
- Mike Carney mike@cray.com Cray Research, Inc. (612) 683-5635
-
-
-
-