Pergunta

This not seems to make any sense, but i'm selecting a BIGINT data from a table, and inserting it into another BIGINT column into another table (the tables are identical, only reside in different servers), and SQL0302N is thrown. WHen i change the value of this bigint column to something lesser, the exception goes away.

The value itself is 2601354496. Other similar values cause the exception too.

Any thoughts?

Foi útil?

Solução

The problem coincidentally wasn't with BIGINT, but with VARCHAR. The database was created with wrong collation (UTF8 at destination, ISO8859 at source), and some special characters were being incorrectly translated.

There were no display issues, but the string storage sizes were varying. And then, apparently, depending on the size of the number, independently of the string, the error was thrown.

But the truth was: the problem was only with the strings. When editing the values through TOAD or IBM Data Studio, the applications apparently fixed the collations and the problems gone away. But at my C# application, it was not happening.

I've decided to recreate the database correctly instead of fixing the data, and everything worked fine.

If only those error messages were more clearer and descriptive...

Thanks for the efforts of everyone.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top