Kbase 19827: ORACLE Error -907 (1252) Missing Right Parenthesis
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
SYMPTOM(s):
ORACLE error see "ORACLE Error Messages and Codes Manual". (1252)
Missing right parenthesis
Oracle Error 907
CAUSE:
This error has been seen running the following piece of code:
DEFINE VARIABLE vAllProductive AS LOGICAL NO-UNDO INITIAL TRUE.
DEFINE VARIABLE vProductive AS CHARACTER NO-UNDO INITIAL "yes".
FOR EACH customer WHERE
customer.sales_rep = 'HXM' AND
(vAllProductive = TRUE OR STRING(customer.discount) = vProductive)
NO-LOCK:
DISPLAY customer.name address sales_rep.
END.
For this example to fail you must change the value of customer.discount to LOGICAL.
FIX:
To solve this problem add a format the STRING function. For example, replace the following line:
(vAllProductive = TRUE OR STRING(customer.discount) = vProductive)
with
(vAllProductive = TRUE OR STRING(customer.discount, "x(3)") = vProductive)
The error should no longer be displayed at this point.