【发布时间】:2019-10-20 02:11:18
【问题描述】:
我需要使用 REGEXP_REPLACE 来执行以下操作:
If word starts with 'ABCD' then replace first four(4) chars with 'FFFF'
else
If word starts with 'XYZ' then replace first three(3) chars with 'GGG'
如何使用 REGEXP_REPLACE 进行条件替换?
【问题讨论】:
-
使用 REGEXP_REPLACE 是问题陈述的一部分,还是您想要提供的解决方案的一部分?最好的答案(由 Gordon Linoff 给出)不使用它。
标签: sql oracle regexp-replace