Select Id, sr_no from table_a a
Left join table_b b
On a.id=b.sr_no
#注意 Athena 中 id 为 bigint,sr_no 为字符串。
我在查询数据时收到诸如无法应用于 bigint、varchar 之类的错误。 我也尝试过cast,但还是不行。
非常感谢任何建议/帮助。
最佳答案
您应该将 bigint
转换为 varchar
或相反。例如:
Select Id, sr_no from table_a a
Left join table_b b
On a.id=cast(b.sr_no as bigint)
-- or alternatively:
-- on cast(a.id as varchar) = b.sr_no
关于sql - 无法应用于 Athena 中的 bigint、varchar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65704193/