向Impala里Insert数据时报错:(type: STRING) would need to be cast to VARCHAR(100) for column

 

原SQL

 INSERT INTO CTS.attribute (id ,attCode)VALUES (2 , 'supplier');

执行时报错:

AnalysisException: Possible loss of precision for target table 'CTS.attribute'. Expression ''supplier'' (type: STRING) would need to be cast to VARCHAR(100) for column 'attcode'

 

修改为:

 INSERT INTO CTS.attribute (id ,attCode)VALUES (2 , CAST('supplier' AS varchar(100)));

 

相关文章:

  • 2021-07-18
  • 2022-01-23
  • 2021-11-20
  • 2021-10-20
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-04
  • 2021-12-10
  • 2021-11-29
  • 2021-08-10
  • 2022-12-23
相关资源
相似解决方案