Re: How to Retrieve particular rows ?.

From: Jan POTTIE <jan.pottie_at_planetinternet.be>
Date: Thu, 6 Apr 2000 19:31:32 +0200
Message-ID: <8cifpk$465$1_at_news.planetinternet.be>


A possible way out :
Define a cursor. (select col1 from table 1 where col1 = ... and col2 =... order by col1 desc).
Fetch 10 rows.

Raj <rajarulmani_at_att.com> wrote in message news:38EA6880.BAC94B8B_at_att.com...
> Can any one help me ?.
>
> I have problem with the following query :
>
> select coll , rownum from table1 where
> col1 <= 'some value1 ' and
> col2 = 'some value2' and
> rownum <= 10
> order by col1 desc.
>
>
> Both col1 and col2 are the primary keys of table table1, and there is
> also and index on both the columns.
>
> The query returns first 10 rows always ( irrespective of the " col1 <=
> 'some value1 ' " ) , which is not i expected. I need 10 rows starting
> from 'some value1' in desc order and rownum from 1 to 10.
>
>
> Thanks,
> Raj.
>
>
Received on Thu Apr 06 2000 - 19:31:32 CEST

Original text of this message