LIMIT clause in Informix selects?
Posted in 1999
Topics: General Discussion
Hi, I can't find a LIMIT clause (or equivalent) for the SELECT syntax in the Informix SQL documentation. What I am looking for is the syntax to get only rows X to Y from a select result set returned to me. I did find the SELECT FIRST X syntax, but this doesn't appear capable of returning an arbitrary set of rows. Am I missing something, or can Informix not do this? I would like to do this in order to present a long list of results in a set of short sections with next/previous buttons. Thanks for any help, Douw. -- Douw Steyn - Visual Information Systems Phone 27-21-4246290, Fax 27-21-4246208, email: douw@vis.co.za
Douw Steyn wrote: > I can't find a LIMIT clause (or equivalent) for the SELECT syntax > in the Informix SQL documentation. > What I am looking for is the syntax to get only rows X to Y from a > select result set returned to me. I did find the SELECT FIRST X > syntax, but this doesn't appear capable of returning an arbitrary > set of rows. > > Am I missing something, or can Informix not do this? Closest approach is a scroll cursor, with FETCH ABSOLUTE x and iteration to collect the rows through row Y. > I would like to do this in order to present a long list of results > in a set of short sections with next/previous buttons. What language are you using for this? Can it provide scroll cursor support. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>