Kbase P93703: Cannot use the tilde (~) in QUERY-PREPARE()
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/6/2004 |
|
Status: Unverified
SYMPTOM(s):
Cannot use the tilde (~) in QUERY-PREPARE()
Cannot use the tilde in the WHERE clause of a dynamic query
Unmatched quote found in procedure. (133)
CAUSE:
When the tilde is entered in the string in the conventional way (as double tilde, '~~') this is resolved later in a single tilde that is not considered as tilde but as a special character. If for example the tilde is passed as last character in the string it couples with the single quote resulting in ~' character that, as documentation reads, is equal to single quote character.
Hence the error message.
FIX:
Enter the tilde as double tilde (this is achieved by entering a double couples of tilde). For example this WHERE clause:
qhandle:QUERY-PREPARE( "FOR EACH customer WHERE name = '~~~~' ").
will returns all the customer where name is actually = '~' .