Consultor Eletrônico



Kbase P26439: Is there a way in SQL-92 to limit the number of records in the result set that the query returns
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/10/2009
Status: Verified

GOAL:

Is there a way in SQL-92 to limit the number of records in the result set that the query returns

GOAL:

How to limit the number of results from an SQL query

GOAL:

How to restrict the number of rows returned from a SQL-92 query

GOAL:

How to limit the number of record fetched in a result set using JDBC client

GOAL:

How to change the Record Fetch Limit on CHAR sql explorer

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

It depends on whether the 3rd party SQL tool allows you to, this isn't controlled by Progress.

Using Progress SQL Explorer tool allows you to do this by setting the Record Fetch Limit.

To change the default setting of 101 on OpenEdge 10.0B or earlier, using GUI SQL Explorer: go to menu View -> Options -> Report Formatting and set Record Fetch Limit to the desired amount.
For any version using CHAR sqlexp use: @FetchLimit <n> , where n is the number of records.
Note that Progress SQL Explorer Internally it uses setFetchSize java API .

For more information about this API go to http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#setFetchSize(int)

Note that But ODBC client there is a limitation on the Fetch Array Size. See solution P84397 for details on this limitation.