Kbase P57108: How to use COMPARE() function
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/22/2009 |
|
Status: Verified
GOAL:
How to use COMPARE() function
GOAL:
How to compare accented characters and words using binary comparison
FACT(s) (Environment):
Progress/OpenEdge Product Family
All Supported Operating Systems
FIX:
In Progress the "=" or EQ operator and other comparison operators are performed as collation comparison based on the sort weight of each character defined in the used collation table.
Many collation tables have the same sort weight defined for, for example, "a" and "ã". In the following scenario a new customer record has been created:
ASSIGN customer.name = "aaaaa"
When the customer named "ããaaa" needs to be found, the following query is executed:
FIND customer WHERE customer.name = "ããaaa",
The result returned will be "aaaaa", because "aaaaa" and "ããaaa" have the same sort weight.
In order to distinguish the accented character, use the COMPARE function as follows for a binary comparison:
FIND FIRST customer WHERE COMPARE(customer.name, "=", "ããaaa", "raw").