home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / oracle / 2610 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.0 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!bcm!aio!casivils
  2. From: casivils@lescsse.jsc.nasa.gov (craig sivils)
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Question using BETWEEN/AND cond with NEXT_DAY/DAY math
  5. Message-ID: <casivils.725035706@node_508ba>
  6. Date: 22 Dec 92 14:48:26 GMT
  7. References: <echoy.724882423@cunews>
  8. Sender: news@aio.jsc.nasa.gov (USENET News System)
  9. Organization: Lockheed Engineering and Sciences
  10. Lines: 19
  11.  
  12. (the mm in the date should be mon, but I assume this was a typo in the post)
  13. It does not work on my machine either, looks like a bug.  A workaround would
  14. be to convert the date into char in the format of yymmdd so that a char sort
  15. would provide the correct order.  The following statement does work on my 
  16. machine.
  17.  
  18. SQL> r
  19.   1  select 'x' from dual
  20.   2  where '921225' between to_char(next_day(sysdate,'sunday')-2,'yymmdd')
  21.   3*                and     to_char(next_day(sysdate,'sunday'),'yymmdd')
  22.  
  23. '
  24. -
  25. x
  26.  
  27.  
  28. (it worked on 22-dec-92)
  29.  
  30.                       Craig
  31.