Xref: alice comp.databases.oracle.misc:56620
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!colt.net!news0.de.colt.net!newscore.gigabell.net!news-x.support.nl!bullseye.news.demon.net!demon!news.demon.nl!demon!sententia.demon.nl!not-for-mail
From: Robin van Spankeren <r.vanspankeren@sententia.nl>
Newsgroups: comp.databases.oracle.misc
Subject: Re: query on date
Date: Tue, 04 Apr 2000 11:12:21 +0200
Message-ID: <38E9B1F5.3763EE41@sententia.nl>
References: <38E48CA0.990C8BAF@gre.ac.uk>
X-Trace: news.demon.nl 954839678 pluto:9339 NO-IDENT sententia.demon.nl:212.238.14.127
X-Complaints-To: abuse@nl.demon.net
X-Mailer: Mozilla 4.7 [nl] (WinNT; I)
X-Accept-Language: nl
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 40



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@sententia.nl
http://www.sententia.nl


