Record Fetching Problem!

Status
Not open for further replies.

Mervyn

New Member
Hi.

I have to fetch number of records (1000nd to 1010th) from a table say customer which has more than 10 thousand records.

I am using a Index which is not a primary index and I directly wants to go and fetch without counting the number of records by using a counter inside the "for each".

Pls help!

Mervyn.
 

bendaluz2

Member
I dont think its possible to do this without counting records unless you are able to use the LIMIT phrase via the SQL broker (dont know, i havent tried it). I'm pretty sure you cant do it through the 4GL broker however. If its something you need to do regularly, i'd consider adding a field to the table that numbers the records and an index on this field to allow indexed access. HTH
 

jongpau

Member
Hi,

Have you tried creating a query on the table (using the index you need)and then using the REPOSITION-FORWARD on the query to get the recordpointer to move to record 1000, after which you can get the next 10records using GET-NEXT?
 
Status
Not open for further replies.
Top