Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: mixing dynamic native sql and static sql?
>> "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.5Received on Sat Apr 13 2002 - 13:33:45 CDT
![]() |
![]() |