参数类型的函数字符串没有匹配的签名:int64支持的签名:字符串(时间戳,[string]),位于[28:10]

dkqlctbz  于 2021-07-27  发布在  Java
关注(0)|答案(1)|浏览(295)

我是googlebigquery的新手,所以我刚刚开始学习sql。我使用string函数得到这个错误(标准sql是打开的)。我猜这个函数不适合标准sql,我该如何更改它?

SELECT STRing(visitor_id) as id
No matching signature for function STRING for argument types: INT64. Supported signature: STRING(TIMESTAMP, [STRING]) at [28:10]
hi3rlvi2

hi3rlvi21#

转换和 int64 对于字符串,可以使用 cast() :

select cast(visitor_id as string)

如错误消息所示 string() 函数用于 timestamp s转换为可读格式。它基本上是 format_timestamp() ,使用合理的格式。

相关问题