Skip to content
Advertisement

Using REGEXP_CONTAINS with a list of substrings

I want to know if its possible to use REGEXP_CONTAINS with a list of substrings from a column in another table.

Essentially I will have one table containing a list of substrings that I want to check against and I am using those substrings against the whole set of table names in a dataset.

Below is the closest approximation as to how I thought it can be done.

Unfortunately this method just hits me with an error saying that the selection from the sub string table returned too many arguments and so regexp_contains couldnt use that as an input argument.

Would using a while loop in the selection of the substring in the table be a solution to this? E.G.

Advertisement

Answer

Use below

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