Kbase P93529: Error (7481) using SQL-92 CASE statement
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/9/2009 |
|
Status: Verified
SYMPTOM(s):
Error (7481) using SQL-92 CASE statement
=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-20008
[JDBC Progress Driver]:Inconsistent types (7481)
Executing the query:
SELECT
CASE
WHEN State = 'MA' THEN City
WHEN State = 'NY' THEN Country
ELSE Name
END
FROM PUB.Customer;
If the middle WHEN phrase contains a character string; not a character field; no error is generated:
SELECT
CASE
WHEN State = 'MA' THEN City
WHEN State = 'CT' THEN 'some string'
ELSE name
END
FROM PUB.Customer;
A query in which the first WHEN phrase contains a character string and the second contains something else (a character field or a function returning a character string) also fails.
If additional WHEN phrases are added to the query, all but the first must use a character string in the THEN part or the query will fail.
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.1D
CAUSE:
Bug# OE00109069
CAUSE:
Using field names or function results in the 'THEN' part of a CASE statement would cause the inconsistent types error
FIX:
Upgrade to 9.1E or later