Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help with query and REGEXP_REPLACE

992557Feb 21 2013 — edited Feb 21 2013
Hi, i am new in this forum. I have a problem with a query, i have this query :

SELECT CONDICION
from cd_capturav2.A31102012condiciones
where diseno like '%RTN%'
and FORMULARIO = 'CUADROII7A1'
and partida = '10101'
and camporef1 = 1;

That give to me this line :

RIESGOTASA|CUADII8RTN|MONERT|=|00||Y|(|RIESGOTASA|CUADII8RTN|CODPROD|=|1411||O||RIESGOTASA|CUADII8RTN|CODPROD|=|14111||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1417||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1418||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1414||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1413||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1416||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1415||O||RIESGOTASA|CUADII8RTN|CODPROD|=|14121||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1412||O||RIESGOTASA|CUADII8RTN|CODPROD|=|1700|)|Y||RIESGOTASA|CUADII8RTN|COEFACTUALIZACION|=|1||Y||RIESGOTASA|CUADII8RTN|CUADRO|<>|7C||||

In that line i need to extract all the CODPROD in one select that returnt the codprod numbers:
1411,14111,1417,1418,1414,1413,1416, etc

I am trying to use the REGEXP_REPLACE function, but idk how i can delete all characters except CODPROD|=|number.

Thank you for your help !

PD: Sry for my english, its not my native language.

Edited by: user12883924 on Feb 21, 2013 8:11 AM
This post has been answered by Frank Kulash on Feb 21 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2013
Added on Feb 21 2013
2 comments
37 views