Consultor Eletrônico



Kbase P107890: SQL: Error (8184) invoking the SQL CASE function.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/28/2008
Status: Verified

SYMPTOM(s):

SQL: Error (8184) invoking the SQL CASE function.

SQLState=HY000
ErrorCode=-20152
[JDBC Progress Driver]:Character string is too long (8184)

The error is generated if first WHEN result is a constant or a variable shorter than subsequent WHEN or CASE results.

Executing a query similar to:
SELECT CASE WHEN LENGTH(comments) = 0 THEN 'a' ELSE comments END FROM PUB.Customer

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.0B
OpenEdge 10.0B02 Service Pack

CAUSE:

Bug# OE00119390

FIX:

Upgrade to OpenEdge 10.1A or later. If upgrading to OpenEdge 10.1A or later is not feasible, and the first WHEN returned result is either a constant or a variable, then ensure that its SQL-WIDTH is longer than any subsequent WHEN or ELSE returned results.
Alternatively, reverse the CASE function to ensure that the first WHEN returned result is a field or a function thereof or an expression the SQL-WIDTH of which is longer than all subsequent WHEN or ELSE returned results.