S.NO id Pid 1 123 PAQ123 2 433 WSD3FF 3 565 PAS45E 4 123 PAQ123X 5 433 WSD3FFY 6 123 PAQ123Z
suppose the above is the sample records in the database.
Now I want to find out in the database whether there is any word (example PAQ123) which is repeating with some prefixes/suffixes like in (PAQ123X,PAQ123Z).
How can I write a query which would result into the above list scenario?
Oracle Setup:
Query:
Output:
If you want to get the matches then you can use a collection:
Query:
or (since I'm not sure
MULTISET
is in 10g):Output