在IMPALA中将科学记数法更改为整数

时间:2018-06-01 01:44:26

标签: sql cloudera

如何在Impala SQL中将custno:5.0256926E7转换为正常的整数/数字?

这是我迄今为止所尝试过的:

SELECT * FROM z9_strategy.dstool_model_data_m 
WHERE snapshot_date_key = 20170630 
  AND custtype_ind = 1 
  AND retailer_retail = 1 
  AND CAST((custno AS FLOAT) AS int);

我也试过SELECT CAST(CAST(custno AS FLOAT) AS int)

1 个答案:

答案 0 :(得分:1)

使用CAST

CAST(custno AS int);