Consultor Eletrônico



Kbase P145341: SQL: Column value exceeding its max length error running a query
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   01/02/2010
Status: Verified

SYMPTOM(s):

SQL: Column value exceeding its max length error running a query

SQLState=HY000
ErrorCode=-210012
[DataDirect][OpenEdge JDBC Driver][OpenEdge] Column in table has value exceeding its max length or precision.

The query:

SELECT 'nothinginparticular' FROM pub.aret WHERE custno = 407391262

generates the error.

Running DBTool fixed some columns but failed to fix a decimal column with MAX-WIDTH set to 1.

Offending field has the following definition in the .df file:

ADD FIELD "statustype" OF "aret" AS logical
DESCRIPTION "R&D"
FORMAT "active/inactive"
INITIAL "yes"
LABEL "Status"
POSITION 4
MAX-WIDTH 1
HELP "(A)ctive, (I)nactive"
ORDER 30
MANDATORY

FACT(s) (Environment):

The query:

SELECT 'nothinginparticular' FROM pub.aret

runs error free.
All Supported Operating Systems
OpenEdge 10.1B
OpenEdge 10.1C
OpenEdge 10.2A
OpenEdge Category: SQL

CAUSE:

Bug# OE00183665

CAUSE:

The Dbtool failed to perform correct decimal width calculation when the MAX-WIDTH attribute is less than the field precision

FIX:

Upgrade to OpenEdge 10.1C04, OpenEdge 10.2A02 or OpenEdge 10.2B.
If upgrading is not feasible, a workaround is to manually adjust the offending field MAX-WIDTH attribute using the Data Dictionary tool. Alternatively:
1. Dump the .df and .d of the table containing the offending field using the Database Administration Tool.
2. Delete the table using the Data Dictionary Tool.
3. Manually adjust the MAX-WIDTH of the offending field in the .df file using a text editor.
4. Load the .df and the .d of the table containing the offending field using the Database Administration Tool.