"SKIP" functionality in Informix 9.x ?
Posted in 2007
Hello. I've recently started a new job where the company uses Informix. Apparently it's version 9.4 on most systems. (If that's not specific enough, I apologize). In any case, I come from a Postgres background, and am used to filtering result sets using "LIMIT" and "OFFSET". I have been trying to manage the same thing with Informix, for the purposes of displaying a data grid of database values. So far, I've found the "FIRST" command to match up to Postgres' "LIMIT" just fine. If I only want 10 records, then "FIRST 10" works. And in searching documentation and these groups, I found syntax for a "SKIP" expression, which is almost identical to Postgres' "OFFSET". With SKIP, if I want records 21 to 30, I could write "SKIP 20 FIRST 10". The problem is, it looks like "SKIP" only works in Informix 10+, leaving me without any idea how to return an offset number of results. I've heard that cursor's are the way to go, but so far I've found no good documentation (for version 9.x) on how I would go about this. Does anyone know a way to duplicate "SKIP" functionality in older version of Informix? Thanks, -Dan