Kbase P124343: 4GL/ABL: Why does the same 4GL query return the same result set in different sort order when run aga
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/27/2010 |
|
Status: Verified
GOAL:
4GL/ABL: Why does the same 4GL query return the same result set in different sort order when run against two databases having the same data?
GOAL:
does the same 4GL query return the same result set sorted differently different when run against two tables ( a temp-table and a database table) having the same data?
FACT(s) (Environment):
All Supported Operating Systems
FIX:
The same 4GL query will return the same result set but in different order when run against two databases having the same data if the query was resolved using non unique indexes and the referenced tables in the two databases were populated in different order.
For example, if a 4GL query uses a primary non unique index is run against two databases having the same data and the .d files containing the same data in different order were used to populate the referenced tables, the result sets will be the same in content but sorted differently.
When Progress uses a non unique index in retrieving a data set, it offers no guarantees what so ever as to the order in which this result set will be returned. If the result set needs to be ordered in a special way, use the BY option of the FOR statement or the USE-INDEX to specify a unique index or restructure the query to use a unique index.