Skip to content
Advertisement

Tag column values contained in other rows

Suppose I have the following table as an input :

I want to know for each row of each table if its Column_List value is contained within another row of that same table (Is considered contained if the pattern matchs X%, not only %X%).

As a desired output I would get :

I would really appreciate some help or clues here.

Advertisement

Answer

With EXISTS and the operator LIKE:

I assume that you want to match only the starting of the column.
See the demo.
Results:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement