Subset Queries + JDBC
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Pat_Quinn
Posted On:   Thursday, January 16, 2003 11:33 AM

Hi Guys, Any one out there know of a way to return a subset of an sql query. I want to be able to pass in a start index and an end index value which will then return me the subset of result rather than the entire resultset I looked at doing something like the following but it doesn't work: select product_code from products where product_code like='B%' and dbms_rowid.rowid_row_number(rowid) >= 50 and dbms_rowid.rowid_row_number(rowid) <= 99 The reason it doesn't work is dbms_rowid.rowid_row_number(rowid) returns the actual rowid for the physical record in the table rather than its position in sql result. Any Ides Guru'   More>>

Hi Guys,

Any one out there know of a way to return a subset of an sql query. I want to be able to pass in a start index and an end index value which will then return me the subset of result rather than the entire resultset



I looked at doing something like the following but it doesn't work:



			
select product_code from products where product_code like='B%'
and dbms_rowid.rowid_row_number(rowid) >= 50
and dbms_rowid.rowid_row_number(rowid) <= 99






The reason it doesn't work is dbms_rowid.rowid_row_number(rowid) returns the actual rowid for the physical record in the table rather than its position in sql result.



Any Ides Guru's??




By the way i'm using Oracle 8i    <<Less

Re: Subset Queries + JDBC

Posted By:   Divakar_Satyanarayan  
Posted On:   Wednesday, January 29, 2003 04:22 AM

Visit the following link. Probably that might give you a solution

http://gethelp.devx.com/techtips/oracle_pro/10min/10min0402/10min0402.asp
About | Sitemap | Contact