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

Home -> Community -> Usenet -> c.d.o.server -> Re: date comparison problem

Re: date comparison problem

From: Michael Rothwell <michael_rothwell_at_non-hp-usa-om46.om.hp.com>
Date: Wed, 20 Jan 1999 10:13:42 -0800
Message-ID: <36A61CD6.41AD42@non-hp-usa-om46.om.hp.com>


Philippe wrote:
>
> Hi Michael,
>
> EE_DATE is CHAR and not VARCHAR2. The date in this field looks like '981231
> ' and is greather than '981231'.
> Try :
>
> select distinct ee_date from engagement_expense
> where EE_DATE <= rpad(to_char( add_months( last_day( trunc(
> sysdate ) ),-1 ),'yymmdd' ),8)
> order by ee_date
>
> HTH
> Philippe
>

Thanks, that did the trick. I am so used to working with VARCHAR2 types, that I didn't think about the padding of blanks on the CHAR type causing the problem.

Thanks again.

Michael.
--
Michael A. Rothwell
Oracle DBA/Oracle Web Developer

Views expressed here are not those of my company - No - Wait - Since I am independent, I guess they are the views of my company. Received on Wed Jan 20 1999 - 12:13:42 CST

Original text of this message

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