Hey thanks for the response. My requirement was quite simple.
I have a table which contain values like test,test.1,test.2 etc.

I have another table which contains these names appended with some more other parameters like the values in this table will be like
test.IsUser,test.1.IsUser and test.2.IsUser.Like this I will have some 100 values for all the 3 names in the other table.

Now I had to form a string like this:
"Key" not like 'test.1.%. and "Key" not like 'test.2.%'.
Also I wanted this string to be passed and used for another purpose.

So I used the method that I had previously posted. I hope there was smething missing in it. But I was not able to figure out as I am new for Oracle.
So if u can me the code which works and gives me the string as above then I would be grateful.Hope I am much clearer now.