Re: working with dates in oracle
Date: Mon, 28 Jul 2003 10:12:44 GMT
Message-ID: <wG6Va.165326$Ph3.20425_at_sccrnsc04>
Don't do it that way. It will cause the query to run very slow. Why? It
will have to convert every row in tablea to string and compare and it will
do an ascii compare which will NOT give you the results you desire.
Instead do:
select f1,f2 from tablea where lastdate >=
to_date('01/01/2002','mm/dd/yyyy')
Jim
"KULJEET" <kuljeet_twtpl_at_hotmail.com> wrote in message
news:febbed51.0307272221.5887b65e_at_posting.google.com...
> rafel.coyle_at_pfshouston.com (UnixUser) wrote in message
news:<a1c0482e.0307271821.468449c3_at_posting.google.com>...
> > I need to write a query in oracle 8i that will allow me to select some
> > rows of date within a date range. In MSSQL I would do something like
> > "select f1,f2 from tablea where lastdate >= '01/01/2002'" . How do I
> > accomplish the same type of query in Oracle.
>
> try-->
> select f1,f2 from tablea where to_char(lastdate,'DD/MM/YYYY') >=
'01/01/2002';
Received on Mon Jul 28 2003 - 12:12:44 CEST