Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Date comparison question
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C079BE.8B0A7780
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
> -----Original Message----- > From: Lisa Yates [mailto:cosnit_at_creighton.edu] > Sent: lundi, 8. janvier 2001 11:27 >=20 > Why doesn't this query ever return... >=20 > where run_date =3D to_date('01-03-2001 16:34:59','mm-dd-yyyy=20 > hh24:mi:ss') >=20 > but this query does.... >=20 > where to_char(run_date) =3D to_char(to_date('01-03-2001 > 16:34:59','mm-dd-yyyy hh24:mi:ss')) >=20 > and so does this query.... >=20 > where to_char(run_date,'mm-dd-yyyy hh24:mi:ss') =3D '01-03-2001=20 > 16:34:59'
Well, I guess my suggestion that run_date may contain a "BCE" (before =
common
era) date was not the answer to your problem. Maybe I misunderstood the
issue. When you say "why doesn't the query ever return", do you mean it
returns zero rows, or do you mean that the query is taking an =
abnormally
long time? If it's taking an abnormally long time, an explain plan on =
the
two queries may reveal the cause.
Jacques R. Kilcho=EBr
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com
------_=_NextPart_001_01C079BE.8B0A7780
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>RE: Date comparison question</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> From: Lisa Yates [<A =
HREF=3D"mailto:cosnit_at_creighton.edu">mailto:cosnit_at_creighton.edu</A>]</F=
ONT><BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Sent: lundi, 8. janvier 2001 11:27</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Why doesn't this query ever return...</FONT>
<P><FONT SIZE=3D2>Well, I guess my suggestion that run_date may contain =
a "BCE" (before common era) date was not the answer to your =
problem. Maybe I misunderstood the issue. When you say "why =
doesn't the query ever return", do you mean it returns zero rows, =
or do you mean that the query is taking an abnormally long time? If =
it's taking an abnormally long time, an explain plan on the two queries =
may reveal the cause.</FONT></P>
<P><FONT SIZE=3D2>Jacques R. Kilcho=EBr</FONT>
<BR><FONT SIZE=3D2>(949) 754-8816</FONT>
<BR><FONT SIZE=3D2>Quest Software, Inc.</FONT>
</P>
<P><FONT SIZE=3D2>8001 Irvine Center Drive</FONT>
<BR><FONT SIZE=3D2>Irvine, California 92618</FONT>
<BR><FONT SIZE=3D2>U.S.A.</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.quest.com" =
TARGET=3D"_blank">http://www.quest.com</A></FONT>
Received on Mon Jan 08 2001 - 16:01:24 CST