Consultor Eletrônico



Kbase P83527: What is the QUOTER function?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   14/06/2004
Status: Unverified

GOAL:

What is the QUOTER function?

FACT(s) (Environment):

Progress 9.1D

FIX:

In version 9.1D the QUOTER Function has been introduced.

The QUOTER function is intended for use in QUERY-PREPARE where in order to process variables, screen values, and input values so that they are suitable for a query WHERE clause, quotes must be supplied around these values. This function facilitates this action.

To address the situation where an UNKNOWN value in a list of concatenated strings could cause the entire string to be UNKNOWN and the QUERY-PREPARE to fail, the QUOTER function does not return UNKNOWN if the <expression> argument is UNKNOWN. Instead, it returns a known character value consisting of an UNQUOTED question-mark, by default, or the 3rd argument, if it is present.

Also, in this situation, a quoted question-mark is not used because it is interpreted as string data in a WHERE clause. After the concatenation is complete, Progress supplies a normal question mark.