大查询-将int列转换为float [英] Big Query - Convert a int column into float
本文介绍了大查询-将int列转换为float的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Big Query中将名为 lauder
的列从 int
转换为 float
.我的表称为 historical
.我已经能够使用此SQL查询
I would like to convert a column called lauder
from int
to float
in Big Query. My table is called historical
. I have been able to use this SQL query
SELECT *, CAST(lauder as float64) as temp
FROM sandbox.dailydev.historical
查询有效,但更改未保存到表中.我该怎么办?
The query works but the changes are not saved into the table. What should I do?
推荐答案
是否要将它们保存在临时表中以便以后使用?
Do you want to save them in a temporary table to use it later?
您可以将其保存到如下所示的临时表中,然后参考"temp"
You can save it to a temporary table like below and then refer to "temp"
with temp as
( SELECT *, CAST(lauder as float64)
FROM sandbox.dailydev.historical)
这篇关于大查询-将int列转换为float的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文