ODBC Error "Column x in table y has value exceeding its max length or precision"

Discussão em 'StackOverflow' iniciado por fdantas, Junho 28, 2016.

  1. fdantas

    fdantas Administrator Moderador

    I get this error from Progress database when running the following query using ODBC:

    SELECT distinct Table.column,
    { fn CONVERT(SUBSTRING(Table.ProblematicColumn, 1, 60), SQL_VARCHAR)} as test
    FROM PUB.Table
    WHERE ( Table.id IN (
    SELECT Table.id
    FROM PUB.Table
    ) )


    I know it's possible to fix it using the DBTools. However, I run queries against multiple Progress databases of multiple clients, so it's not practical to do this every time. Also, for some reason, the ODBC client I'm using (PHP), doesn't show any error when this happens. Instead, it returns an empty result.

    The convert I did to a VAR_CHAR of 60 character did help until I added the sub-query. When the sub-query is there, I get again the same error.

    Interestingly enough, when the 'distinct' is not there, it's working. But I do need the distinct.

    Continue reading...

Compartilhe esta Página