Oracle10g 需要有关regexp\u substr和regexp\u like的帮助吗

Oracle10g 需要有关regexp\u substr和regexp\u like的帮助吗,oracle10g,Oracle10g,我在一列中有如下数据,有5条记录 Failed to process Batch task. An exception occured while building Bond(00010068, BOND, CLOSE, ICT, TOK, EOD, Bond_EOD): You are trying to get DBond that doesn't exist. (DeliveryCount=2) Failed to process Batch task. An exception occu

我在一列中有如下数据,有5条记录

Failed to process Batch task. An exception occured while building Bond(00010068, BOND, CLOSE, ICT, TOK, EOD, Bond_EOD): You are trying to get DBond that doesn't exist. (DeliveryCount=2)
Failed to process Batch task. An exception occured while building Bond(00010068, BOND, CLOSE, ICT, TOK, EOD, Bond_EOD): You are trying to get DBond that doesn't exist. (DeliveryCount=0)
Failed to process Batch task. There was an error generating the XML document. (DeliveryCount=0)
Failed to process Batch task. There was an error generating the XML document. (DeliveryCount=0)
Failed to process Batch task. There was an error generating the XML document. (DeliveryCount=0)
在这里,我需要得到像需要数据一样的数据,这些数据是封闭的

00010068, BOND, CLOSE, ICT, TOK, EOD, Bond_EOD
00010068, BOND, CLOSE, ICT, TOK, EOD, Bond_EOD 
我不想再重复上面提到的数据了

除此之外,还必须将行数据拆分为列,如

col1        col2    col3        col4    col5        col6    col7
-------------------------------------------------------------------------
00010068    BOND    CLOSE       ICT      TOK        EOD     Bond_EOD
你能帮我做点什么吗

with tab as
(select 'Failed to process Batch task. An exception occured while building Bond(00010068, BOND, CLOSE, ICT, TOK, EOD, Bond_EOD): You are trying to get DBond that doesn''t exist. (DeliveryCount=2)' s from dual
union all select 'Failed to process Batch task. An exception occured while building Bond(00010068, BOND, CLOSE, ICT, TOK, EOD, Bond_EOD): You are trying to get DBond that doesn''t exist. (DeliveryCount=0)' from dual
union all select 'Failed to process Batch task. There was an error generating the XML document. (DeliveryCount=0)' from dual
union all select 'Failed to process Batch task. There was an error generating the XML document. (DeliveryCount=0)' from dual
union all select 'Failed to process Batch task. There was an error generating the XML document. (DeliveryCount=0)' from dual
)
select   trim(regexp_substr(parsed, '[^,]+', 1, 1)) col1
       , trim(regexp_substr(parsed, '[^,]+', 1, 2)) col2
       , trim(regexp_substr(parsed, '[^,]+', 1, 3)) col3
       , trim(regexp_substr(parsed, '[^,]+', 1, 4)) col4
       , trim(regexp_substr(parsed, '[^,]+', 1, 5)) col5
       , trim(regexp_substr(parsed, '[^,]+', 1, 6)) col6
       , trim(regexp_substr(parsed, '[^,]+', 1, 7)) col7
from
(
  select substr(regexp_substr(s, 'bond\([^)]+', 1, 1, 'i'), 6) parsed
  from tab where regexp_like(s, 'bond\(.+?\)', 'i')
);
regexp_喜欢“bond\.+?\”,如果字符串s包含bond…,则“i”返回true,不区分大小写的i标志;+?非reedy是否至少有一个符号-第一个符号之前的任何符号

子字符串xp_substrs,'bond\[^]+',1,1,'i',6-仅获取所需的子字符串。。。从邦德。。。。Oracle10g不支持子表达式,所以我们不得不凑合使用公共子表达式来切断连接


最后,从解析的字符串中获取第n个none逗号序列