永洪社区

标题: 字符函数报错 [打印本页]

作者: yunzi    时间: 2022-10-24 18:14
标题: 字符函数报错
想对银行数据进行清洗,但按以下方式写新的计算列报错,向大佬们请教,看看是哪的问题:

var str = col['银行']
case
when (find(str,'工行') >0) then replace(str,'工行','工商银行')
when (find(str,'交行') >0) then replace(str,'交行','交通银行')
when (find(str,'建行') >0) then replace(str,'建行','建设银行')
when (find(str,'农行') >0) then replace(str,'农行','农业银行')
else str
end


作者: yhdata_yzm    时间: 2022-10-24 18:14
yunzi 发表于 2022-10-25 13:50
谢谢回复。
你那边能跑出来吗?
我这边尝试报语法错误:

可以跑出来啊,你看看是不是那里写错了
作者: yhdata_yzm    时间: 2022-10-24 19:00
报什么错
作者: yunzi    时间: 2022-10-25 09:04
yhdata_yzm 发表于 2022-10-24 19:00
报什么错

(, 下载次数: 242)