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 problem with Dates

Re: Order By problem with Dates

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 17 Aug 1999 21:46:53 +0100
Message-ID: <934923181.4784.0.nnrp-03.9e984b29@news.demon.co.uk>

You are allowed to 'order by' something that does not appear in the select list, so you can do this:

select distinct to_char(to_date(substr(to_char(s_date),1,4)||'-'||substr (to_char(s_date),5,2)||'-'||substr(to_char(s_date),7,2),'YYYY-MM- DD'),'Mon DD, YYYY')
from tssds.ehefmsam
where locdesc = 'MW-8'
order by s_date
;

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Received on Tue Aug 17 1999 - 15:46:53 CDT

Original text of this message

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