【发布时间】:2021-02-05 04:37:36
【问题描述】:
所以我尝试根据条件更新一些单元格,如果品牌名称是 robinhood,然后我们将产品设置为加密,我在 redshift 中尝试了下面的代码,但我得到了错误
ERROR: CASE types character varying and boolean cannot be matched
select *,
case brand
when 'robinhood'
then business_unit_product::varchar = 'crypto'
else business_unit_product::varchar
end
from tickets;
我应该改变什么?
【问题讨论】:
-
不要使用SELECT,使用UPDATE来更新表数据。
-
@jarlh 我该怎么做?代码会是什么样子?
标签: sql amazon-redshift