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: Problem with order when selecting

Re: Problem with order when selecting

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Wed, 07 Jul 2004 22:38:21 GMT
Message-ID: <xX_Gc.42044$IQ4.41187@attbi_s02>

"Roman Klesel" <rupa_at_firemail.de> wrote in message news:slrnceotkp.pau.rupa_at_gemini.office.noris.de...
>
> Dear SQL hackers,
>
> I would like to do the following:
>
> select
> to_char(first_time),
> count(first_time)
> from v$log_history
> group by to_char(first_time)
> order by first_time
>
> Unfortunately this does not work.
> However when I:
>
> order by to_char(first_time)
>
> I don't get the order I want.
>
> Can some one please show me how this is ment to work!
>
> Thanks in advance.
>
> Roman Klesel
>

to_char means you want to do a character ordering not a date ordering. You might try
to_char(first_time,'yyyymmddhh24miss')
Jim Received on Wed Jul 07 2004 - 17:38:21 CDT

Original text of this message

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