Hello Everyone,
I have a string that contains a lot of data separated by a semicolon. Now, what I want to do is to extract all of my needed data which are just hardware. Here is an example of the text:
DUTBOARD|A1DT25522;LOADBOARD|A2LB1896;PROBECARD|A4PC40257;PROGRAMNAME|DS2781;TESTOPTION|POSTBAKE;TESTTEMP|ROOM TEMP
Now what I want is for it to be just like this:
DUTBOARD|A1DT25522;LOADBOARD|A2LB1896;PROBECARD|A4PC40257;
What I was planning to do is to just get the DUTBOARD, LOADBOARD and PROBECARD and just concatenate it. Below sql code gets the value of the Loadboard:
SELECT
regexp_substr('LOADBOARD|A2LB12833;PROGRAMNAME|MAX2659_H;PROGRAMREV|H;TESTOPTION|FR2659_H;TESTTEMP|25;STD IPH|6545.4545454545', '(;|^)LOADBOARD\|(.*)(;|$)', 1, 1, '', 2) lol
FROM dual;
My problem is that it returns all of the text past the LOADBOARD instead halting when it sees a semicolon. Can you help me? By the way I am using oracle 11g
Thanks in advance.