query help to solve problem

  • I want to select all rows from table 'relatives' where column 'relative' contains any substring that matches any member of a list of strings returned by the query (SELECT [name]FROM [relativegroup] where nodes like '%ALOHA%'

    how can i do that?

    Thanks

    Pat

  • Performance might prove interesting, but this is an option:

    SELECT R.Relative

    FROM Relatives R, RelativeGroup RG

    WHERE RG.Nodes LIKE '%ALOHA%'

    AND R.Relative LIKE ('%' + RG.[Name] + '%')

    I can't make a good performance test on it at the moment, but it's a starting point.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply