Skip to Content
Author's profile photo Former Member

IQ Load Table 时报”Right truncation of string data”的解决方法

   用户的一个系统从IQ 12.7升级到IQ 15时,原先正常的LOAD操作在15下报”Right truncation of string data “错后操作失败。

   原因是数据库选项”STRING_RTRUNCATION”在12.7的缺省值为’OFF’,而在IQ 15中变为了’ON’。下面是对于这个数据库选项的解释(摘自IQ 12.7参考手册)

      Determines whether an error is raised when an LOAD、INSERT or UPDATE truncates a CHAR or VARCHAR string.
      When STRING_TRUNCATION is OFF, the
      exception is not raised and the character string is silently truncated.
      If the option is ON and an error is raised, a ROLLBACK occurs.



       select * from sysoptiondefaults where option_name like ‘%STRING_R%’

       select * from sysoptions where “option” like ‘%STRING_R%’


   解决这个问题的方法就是在IQ 15中使用如下命令把STRING_RTRUNCATION设为OFF:

       set option public.STRING_RTRUNCATION=’OFF’

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.