Consultor Eletrônico



Kbase P185097: QUOTER function adds quote (") before existing quote (") in string to be quoted
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/1/2011
Status: Unverified

SYMPTOM(s):

QUOTER function adds quote (") before existing quote (") in string to be quoted

Query string quoted with QUOTER function fails because of unmatched quote.

FACT(s) (Environment):

Internal quote is escaped with tilde (~) or backslash (\)
Beginning and ending quotes are added to string as expected.
All Supported Operating Systems
Progress/OpenEdge Product Family

CAUSE:

This is expected behavior. In OpenEdge Development: ABL Reference, "ABL Reference > QUOTER function" , the last note states:

If <expression> is of data type CHARACTER, internal quotes are doubled.
The purpose of this is to automatically escape internal quotes. However, it can make the expression malformed if the internal quote is already escaped with a tilde or backslash (UNIX only).

FIX:

Do not escape internal quotes before using the QUOTER function.