retriving particular rows in order [message #372730] |
Tue, 06 March 2001 09:23  |
Siddharth Bahri
Messages: 18 Registered: March 2001
|
Junior Member |
|
|
Hi,
I am opening a cursor in an oracle package
with a statement similar to the one given below.
The cursor returns rows 10 to 20 from the selected
rows sorted in a particular field
OPEN CURSOR_VAR FOR
select fieldname from
TableName
where ROWNUM<=20
MINUS
Select fieldname from
TableName
where ROWNUM<=10
ORDER BY fieldname desc;
My problem is that oracle first retrives the
10 rows and then sorts them which does'nt give the
proper rows.
I want it to sort all the rows first and then retrive
the rows 10 to 20
Any suggestions???
|
|
|
|