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: query on date

Re: query on date

From: Robin van Spankeren <r.vanspankeren_at_sententia.nl>
Date: Tue, 04 Apr 2000 11:12:21 +0200
Message-ID: <38E9B1F5.3763EE41@sententia.nl>

simon cunningham schreef:

> Hi
>
> I have a table with the date_of_death as a column dd-mm-yy.
> Now I wan to run a select statement from this column, where the clause
> is on the year,
>
> So
> select *
> from patient
> where (trunc ('date_of_death', 'YY') = '94'
> //where YY is year
> Is this the corect way to run this query
>
> Thanks everyone

This may work:

select *
from patient
where to_char('date_of_death', 'YY') = '94'

Regards,
Robin

--



Sententia bv
Kavelpad 8
2408 RM Alphen aan den Rijn
Tel: 0172-496148
Fax: 0172-496233
email: r.vanspankeren_at_sententia.nl
http://www.sententia.nl Received on Tue Apr 04 2000 - 04:12:21 CDT

Original text of this message

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