Kbase P115846: Why do empty (null) strings and strings containing a single space sort the same when a BY clause is
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  04/05/2006 |
|
Status: Unverified
GOAL:
Why do empty (null) strings and strings containing a single space sort the same when a BY clause is used in a query?
FIX:
Progress trims trailing spaces from sort keys before ordering the data. Consequently it is possible to have code like the following show the output as being a record with a null string, followed by a record with a single space in it, followed by another record with a null string. This is normal behavior for Progress.
DEFINE TEMP-TABLE ttTest NO-UNDO
FIELD F1 AS CHARACTER.
CREATE ttTest.
ASSIGN ttTest.F1 = "".
CREATE ttTest.
ASSIGN ttTest.F1 = " ".
CREATE ttTest.
ASSIGN ttTest.F1 = "".
FOR EACH ttTest BY ttTest.F1:
DISPLAY F1 LENGTH(F1).
END.