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: Using Generic Comparator in Oracle ORDER BY

Re: Using Generic Comparator in Oracle ORDER BY

From: HansF <News.Hans_at_telus.net>
Date: Wed, 26 Oct 2005 16:23:16 GMT
Message-Id: <pan.2005.10.26.16.21.54.56618@telus.net>


Not in a position to check confirm it works in 9i, but in 10g you can definitely sort on the result of a select or function. Consider this as an example of the technique (although not a spectacular use of the capability)

  SELECT text
    FROM USER_SOURCE u
   ORDER BY (SELECT name||type||to_char(line)

               FROM USER_SOURCE b
              WHERE u.name=b.name
                AND u.type=b.type
                AND u.line=b.line)
      

or
  SELECT (col_list)
    FROM parts_explosion e
   ORDER BY (SELECT description

               FROM parts_description d
              WHERE e.part_no=d.part_id)

That might lead you in a favourable direction .

-- 
Hans Forbrich                           
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com   
*** I no longer assist with top-posted newsgroup queries ***
Received on Wed Oct 26 2005 - 11:23:16 CDT

Original text of this message

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