Similarly oracle has rownum feature. My requirement is if I have 50
records in a table, I need to show 10 records at a time and if the
user click next, I should get the next 10 records. Is there a
equivalent in informix?
Thanks
No, there isn't a direct equivalent. The nearest approximation is
SELECT FIRST n ...
but that only does half the job. Of course, with a scroll cursor, you
could use SELECT FIRST 20 ... followed by do FETCH ABSOLUTE 10 to get
the 10th record and then repeat till you reach the end, but it is
somewhat circuitous...
--
Jonathan Leffler (jlef...@earthlink.net, jlef...@us.ibm.com) #include
<disclaimer.h>
Guardian of DBD::Informix 1.00.PC2 -- http://dbi.perl.org/
That is not question for database - it is question for tool you are using.
In Inormix 4GL and in Panther it is simple.
1. declare cursor for select
2. define array in your application with 10 elements
3. open cursor
4. fetch cursor into array
5. when user click next just continue (down) with cursor
Nebojsa
------------------------------------
Remove spam block (DELETE) to reply