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: mixing dynamic native sql and static sql?

Re: mixing dynamic native sql and static sql?

From: Peter Mutsaers <plm_at_gmx.li>
Date: 13 Apr 2002 20:33:45 +0200
Message-ID: <uwuvbtpme.fsf@mutsaers.com>


>> "John" == John Russell <netnews2_at_johnrussell.mailshell.com> writes:

    John> You can use something like

    John> ORDER BY DECODE(test_expression, case1, column1, case2, column2,     John> case3, column3, ...)

Yes, but in my case, I have to order on multiple columns (for some inputs) and some of the coumns are asc, some are desc. Seems quite impossible with the order by decode construct.

If only I could do it in two steps, first creating a ref cursor using a static query, then using a small dynamic query that uses this ref cursor and adds the (dynamic) order by stuff.

-- 
Peter Mutsaers  |  Dübendorf    | UNIX - Live free or die
plm_at_gmx.li      |  Switzerland  | Sent via FreeBSD 4.5
Received on Sat Apr 13 2002 - 13:33:45 CDT

Original text of this message

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