从 sql 中的每一行中删除重复的数字
Remove duplicate number from each row in sql
我有这个table:
A B C
Abc. Bcd. 1223
Abc. Bdh. 144777
我想从 C
列的每一行中删除重复项。输出应该是这样的:
A B C
Abc. Bcd. 123
Abc. Bdh. 147
我正在使用 SAP hana,sql 的许多功能在那里不起作用。
为什么不像这里那样使用正则表达式 (Regex to remove duplicate letters)?
select REPLACE_REGEXPR ('([A-Za-z0-9])+' in 'AA2234b23'
WITH ''
OCCURRENCE ALL)
from dummy;
结果:
A234b23
我有这个table:
A B C
Abc. Bcd. 1223
Abc. Bdh. 144777
我想从 C
列的每一行中删除重复项。输出应该是这样的:
A B C
Abc. Bcd. 123
Abc. Bdh. 147
我正在使用 SAP hana,sql 的许多功能在那里不起作用。
为什么不像这里那样使用正则表达式 (Regex to remove duplicate letters)?
select REPLACE_REGEXPR ('([A-Za-z0-9])+' in 'AA2234b23'
WITH ''
OCCURRENCE ALL)
from dummy;
结果: A234b23