我有一个多值列MISC_CONTENT,该列中包含以下字符串:
amount = 7995 ;channel = SXXXN21 ;group_header = NPS099 ;currency = EUR
如何通过使用group_header进行查找来检索值NPS099?
答案 0 :(得分:0)
我们可以尝试使用REGEXP_SUBSTR
:
WITH yourTable AS (
SELECT 'amount = 7995 ;channel = SXXXN21 ;group_header = NPS099 ;currency = EUR' AS col FROM dual
)
SELECT
REGEXP_SUBSTR(col, '(^|\s|;)group_header = (.*?)\s*(;|$)', 1,1,NULL,2)
FROM yourTable;