Hi,
I have a string which looks like --
12361_BBMS_GTECHL|12362_BBMS_PRIM|12363_BBMS_SEC|....and so on
So i need to fetch
12361 and BBMS_GTECHL
12362 and BBMS_PRIM
12363 and BBMS_SEC
i used --
select *
FROM
TABLE(XMLSEQUENCE(
EXTRACT(
XMLTYPE('<rowset><row><Code>'||
replace(replace('12361=BBMS_GTECHL|12362=BBMS_PRIM','|','</Value></row><row><Code>'),'=','</Code><Value>')||'</Value>'||'</row></rowset>'),'/rowset/row')));
declare
l_val varchar2(1000);
begin
select substr('12361_BBMS_GTECHL|12362_BBMS_PRIM', instr('|')+1) into l_val from dual;
dbms_output.put_line(l_val);
end;
But getting problem in getting desired result !
I have need to write this logic in a package that i will do if i got some hint here.
My DB version is --
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production