Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Amit Patel asked how to select the next rows (1001-2000) in Informix 11.70. Paul Watson and Art Kagel answered with SELECT SKIP 1000 FIRST 1000 * FROM emp. Henri Cujass suggested an SPL routine, and Art added that a cursor or scroll cursor can walk through a result set. Solved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
AMIT PATEL — source: IBM Community (ConnectedCommunity.org) Informix forum
Hello All,
How can I select Next few rows . e.g. SELECT FIRST 1000 * FROM emp ----> it will give me first 1000 record.
But if I need next 1001 - 2000 rows , then how can I select in Informix 11.70?
Kindly guide.
Thanks
Amit Patel
------------------------------
AMIT PATEL
------------------------------
#Informix
↪ replying to AMIT PATEL
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
Select skip .....Cheers
Paul
Paul Watson
Oninit LLC
+1-913-387-7529
www.oninit.com
Oninit® is a registered trademark of Oninit LLC
↪ replying to AMIT PATEL
AMIT PATEL — source: IBM Community (ConnectedCommunity.org) Informix forum
I checked in google and found below syntax :
SELECT SKIP 1000 FIRST 1000 * FROM emp ; ---- it will skip first start 1000 records and will show next 1000 rows;------------------------------
AMIT PATEL
------------------------------
↪ replying to AMIT PATEL
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
As Paul hinted:
SELECT SKIP 1000 FIRST 1000 * FROM emp;------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
I would have been more expansive but as most of posts to the forums are delays by 24+ hours .....
Cheers
Paul
Paul Watson
Oninit LLC
+1-913-387-7529
www.oninit.com
Oninit® is a registered trademark of Oninit LLC
↪ replying to AMIT PATEL
Henri Cujass — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi Amit,
I prefer a small SPL routine in the case to go step by step through the result set - more flexible.
Regards
Henri
------------------------------
Henri Cujass
leolo IT, CTO
Germany
------------------------------
↪ replying to Henri Cujass
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
FWIW, in an application you can also use a CURSOR to process portions of a result set fetched without the FIRST <n> clause. Also you can use a SCROLL CURSOR to move forward and backward through a result set!
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
BK8 Indonesia — source: IBM Community (ConnectedCommunity.org) Informix forum
Oh I see. Thank you so much for your info.
------------------------------
BK8 Indonesia
------------------------------
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.