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: order by date

Re: order by date

From: Kenny Gump <kgump_at_mylanlabs.com.nospam>
Date: Tue, 27 Jul 1999 07:37:28 -0400
Message-ID: <379d9997@News>


The to_date only changes the display of the date, not the way Oracle will sort. If you want to sort by just month and not day or year use:

to_char(datum, 'MM.DD.YYYY')

Also if datum is already a date your query will give you an error.

Kenny Gump

Steffi wrote in message <379D7B68.D3904275_at_planet.de>...
>hi..
>I want to order my values by month.
>
>I tested this, but it's not correct:
>can anybody help me?
>
>CURSOR cdate IS
>SELECT name, datum
>FROM feiertage
>ORDER BY to_date(datum,'MM.DD.YYYY') ASC;
>.
>.
>htp.TableData(TO_CHAR(crec.datum,'DD.MM.YYYY'));
>.
>.
Received on Tue Jul 27 1999 - 06:37:28 CDT

Original text of this message

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