我需要将值从临时表加载到目标表,其中临时表中的所有列都分别采用 varchar 格式,
现在,当我将它们转换为十进制并加载到最终表时,某些列失败了。
stage_table :
创建集合表stg(down_speed varchar(13));
目标表:
创建集合表trgt(down_speed十进制(8,4));
查询
insert into trgt (down_speed) select cast(down_speed as decimal(8,4)) from stg;
错误 插入失败 2617:(-2617) 计算涉及 **column_name
的表达式时发生溢出stging table 导致错误的列值:'88440'
select cast('88440' as decimal(8,4)) from stg;
在 stg 中 down_speed 列的所有值都在 8 个字符以下,通常我会像这样进行转换,但我找不到哪里出错了?