I get the following error message as I try to import data from an ASCII delimited file wich contains UTF-8 characters (converted from Chinese characters with BIG-5):
SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
However, I have checked the length of the importing data and found they do not exceed the corresponding field length. Does anyone get idea, hints or any experience for this problem, please help me.
Thanks in advance.
Remember, some characters represented by UTF-8 take 2 or 3 bytes, whereas field length is specified in bytes, not characters. This means that a string consisting of 10 UTF-8 characters will not necessarily fit into a CHAR(10) field.
Thanks for your help. I find a way to overcome my problem today by adding a 'CODEPAGE=1208' parameter on my data importing command (preserve the import data in BIG-5 format). The error is gone and the conversion is OK. Anyway, you advise is very helpful for me to shoot this problem. Thanks again.