Re: How to retrieve first 50 rows , next 50 rows and so on in Informix
Posted in 2003
insert into temp ( as somebody already suggested ) , then fetch 50*,then delete first 50 and then again 50* :), or select min and max rowid
and use an approximation like ( max - min )/50 ( divide in 50's ecah ,
but ofcourse this set will have few rows ) and then select based on
rowids . If u want some other order, use any numeric key .
We used something similar in checkpointing - query will be like - where
prod_id > l_prod_id and batch_num > l_batch_num order by prod_id, batch_num
Rgds
Preetinder
KalpanaPai wrote:
>I know that
>Select first 50* from Table will get only 50 rows>But i want to know from the application side , if the query returns
>more rows , i want to get them in 50's and display and next 50 etc, in
>that way the query will not kill the memory if more sessions are
>connected without bringing the whole data to the buffer .
>
>Any Solution ????????/
>Thanks in advance
>Kalpana
>
>
>
>kalpanapai@hotmail.com (KalpanaPai) wrote in message news:<8b77f6f5.0308241906.21eb6f22@posting.google.com>...
>
>
>>Hi All
>>
>>Is there any equivalent command for SET ROWCOUNT or LIMIT in INFORMIX
>>to get the first 50rows, next 50 rows and so on if query returns 2500
>>rows .
>>
>>So that the number of rows retrived for each page can be limited in
>>each session.
>>
>>Any clues would be appreciated.
>>Thanks in Advance
>>Kalpana
>>
>>
sending to informix-list