ORA-01406: fetched column value was truncated
-----------------------------------------------
服务端:AMERICAN_AMERICA.WE8ISO8859P1
客户端:AMERICAN_AMERICA.ZHS16GBK
客户端,通过toad 修改rka091中的一个varchar2的值,提交后,再次查询。报出ORA-01406的错误。
-----------------------------------
修改客户端的环境变量为,AMERICAN_AMERICA.WE8ISO8859P1,重新启动toad后, 查询正常。
From Oracle document...
ORA-01406 fetched column value was truncated
Cause In a host language program, a FETCH operation was forced to truncate a character string. The program buffer area for this column was not large enough to contain the entire string. The cursor return code from the fetch was +3.
Action Increase the column buffer area to hold the largest column value or perform. other appropriate processing.
What we want to know is that:[B]What you have done on your database![/B]
This error is definitely because you modified the definition of this column in the table.
The client program is supposed to fetch this column into a varchar2 variable with the same length, then you increased the column in database, which exceeds the length of the client variable, now the client program has to truncate the value fetched from database to fit into the variable.
This is the very scenario where anchored variable is useful.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13726712/viewspace-762300/
,如需转载,请注明出处,否则将追究法律责任。