| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q-Sort for PL/SQL Tables
You probably don't need one -
Off the top of my head, and making it up as I go along:
create a function that takes an integer as input, and returns a value from your table, and a function returning your_table.count
Create a table holding a large number of rows
Select rownum, function1(rownum) sorted_table_value from created_table where rownum <=
(select count_function() from dual); order by 1;
Something like this will return your table in sorted order, but you'll have to refine it a bit, watching out especially for gaps in the pl/sql table (your_table.exists) to eliminate them from the output efficiently.
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
Charles Arcudi wrote in message <36B723AE.47DF54C6_at_eli.net>...
>Has anybody written a q-sort for PL/SQL tables? Odd that Oracle doesn't
>incorporate some kind of sort routine for these things.
>
Received on Tue Feb 02 1999 - 14:45:19 CST
![]() |
![]() |