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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL, Looking for help with Date stuff.

Re: SQL, Looking for help with Date stuff.

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Mon, 26 Jul 1999 23:56:50 +0200
Message-ID: <933026197.25545.0.pluto.d4ee154e@news.demon.nl>


Simply use
where to_date(<misused column>,'MM/DD/YYYY') < ADD_MONTHS(sysdate,-5) and that should be all

Hth,

Sybrand Bakker, Oracle DBA

Hank Janssen <hjanssen_at_dont.spam.me.com> wrote in message news:933020710.728.75_at_news.remarQ.com...
> Greetings all,
>
> I am trying to come up with an elegant solution to a problem I am
> having.
>
> I am working within a DB of which the schema is part of a commercial
> system. This schema has fields in a table where I can store data that
> the commercial system will ignore. This table has a relation back to a
> customer account.
>
> This schema offers me 40 or so varchar(20) fields. And I am using one
> of these fields to store a date. (Which I format to MM/DD/YYYY).
>
> Now, I want to select from this table all records older than 5 months.
>
> But the field that I stored the date in is actually a varchar field
> (which I am limited to)
>
> Is there a nice way to write a select so I can still get all records
> older than 5 months.??
>
> Thanks!!!
>
> ----------------------------

http://www.anteus.com ---------------------------

> Hank Janssen. | When you get old, you to will fantasize
that
> Anteus Ltd. Seattle | Politicians where honest, prices where
> EMAIL: hjanssen_at_anteus.com | reasonable and children respected their
elders
>
>
Received on Mon Jul 26 1999 - 16:56:50 CDT

Original text of this message

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