Hi All,

Here is what I tried, Please suggest if any other better way to do this:


set serveroutput on;

declare

string1 varchar2(100);

begin

string1 := '[test1][test2][test3]';

for i in (select col1 from tab1) loop

string1 := regexp_replace(string1, i.col1);

end loop;

string1 := regexp_replace(string1, '\[|\]');

if (length(string1) > 0 ) then

*dbms_output.put_line*('more exists');

else

*dbms_output.put_line*('all exists');

end if;

end;








On Tue, Aug 2, 2011 at 2:07 PM, Gayathri <[email protected]> wrote:

> Hi All,
>
> I have a set of strings: test1, test2, test3, test4, test6, test89, test100
>
> and a contatinated string something like -
> '[test3][test1][test5][]test34][test5][test100][test89]'
> need to check if all the strings in the set of strings are in the
> concatenated string?
>
> I can load the string set into a table and loop thr each one and then
> compare if it exists in the concatenated string.
>
> Please suggest how do I code this?
>
> Thanks
> G
>

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to