如果逗号分隔符是字符串的一部分,如何修改以下查询以获得正确的值?
SELECT REGEXP_SUBSTR('141001,update PRDTBL set a10=''141001'' where A03=''62'' and FIX_FLT=''1'' AND SUBSTR(TXN_ID,1,2)=''LN'' AND A05=''N'',62,1,LN,,,,N,FXL BUSINESS (M),FIXED LOANS - OTHERS,,DBA,2013-09-25,DBA,2013-09-25',
'([^,]*)(,|$)', 1,2, 'i', 1)
FROM DUAL
上面的查询将返回值:
update portfldb set a10='141001' where A03='62' and FIX_FLT='1' AND SUBSTR(TXN_ID
期望值应该是:
update portfldb set a10='141001' where A03='62' and FIX_FLT='1' AND SUBSTR(TXN_ID,1,2)='LN' AND A05='N'