Kbase P41820: Records return out of order when querying a temp-table with
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/11/2003 |
|
Status: Unverified
SYMPTOM(s):
Defined a temp-table like a real database table.
BUFFER-COPied database records into the defined temp-table.
Querying the same set of records from both the defined temp-table and the real database table at the same time.
Using the same non-unique field to sort records from the temp-table and from the real table as well.
The order that the records from both the temp-table and the real table come out is different.
CAUSE:
When sorting on a non-unique field, all records with the same value (like state = MA) will come in rowid order and be totally random. The assignment of rowids is completely random and if they happen to come in order it is a mere coincidence. This is expected behavior.
FIX:
Sort on a unique field or add another BY clause to the query so that the combination of the fields to sort the records on is unique.