MSSQL TOP n equivalent for Informix?
MSSQL TOP n equivalent for Informix?
(OP)
I'm working on an application which will work against several DBMS's. I've found that if I use the MSSQL specific TOP n in one of my queries I cut time to a third.
I've been looking for an equivalent that for INFORMIX.
Basically it returns either the TOP n percent, or the TOP n rows. I need something that returns only 1 row, as TOP 1 would do.
Is there a equivalent thing for INFORMIX?
Bless!
AoN
I've been looking for an equivalent that for INFORMIX.
Basically it returns either the TOP n percent, or the TOP n rows. I need something that returns only 1 row, as TOP 1 would do.
Is there a equivalent thing for INFORMIX?
Bless!
AoN
RE: MSSQL TOP n equivalent for Informix?
Check the documentation on the informix select clause. New, with the 7.x engine, you can do something like this:
selct FIRST 2 {+FIRST_ROWS} * from some_table
where some_column = "some_value"
The above gets the first two rows.
regards,
Ed
RE: MSSQL TOP n equivalent for Informix?