Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Variable Order By clause
Question:
Background:
Any ideas welcome,
Thanks,
~ ~ David
declare
ord1 integer := 1;
ord2 integer := 2;
CURSOR c_Known_Issues IS
SELECT seq_no, issue_type FROM known_issues WHERE system_id = 99 ORDER BY ord1, ord2;
begin
FOR known_Issue IN c_Known_Issues LOOP
dbms_output.put_line(known_Issue.seq_No);
END LOOP; end;
Produces output:
2
1
16
15
14
13
12
11
10
9
8
7
6
5
4
28
30
31
36
37
Received on Tue Aug 10 1999 - 16:18:53 CDT
![]() |
![]() |