Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: cursor :can you pass order-by as parameter?
On Wed, 31 Mar 2004, burnunit_at_DROPTHIS.hotmail.com wrote:
> Does anyone know how to dynamically specify the order by clause
> within a cursor?
We solved it by sending in the order by column and then putting the following in the order by clause.
ORDER BY CASE v_sort_column
WHEN 'A_BND_ID_ASC' THEN bnd_id ELSE NULL END ASC , CASE v_sort_column WHEN 'A_BND_ID_DESC' THEN bnd_id ELSE NULL END DESC [...]
-- Galen BoyerReceived on Wed Mar 31 2004 - 12:52:11 CST