labkey SQL: doing a join with IN

LabKey Support Forum (Inactive)
labkey SQL: doing a join with IN Matthew Bellew  2011-06-07 13:45
Status: Closed
 
IN is not a set method not a string method. So this won't work. You could try using LIKE

   t2.col LIKE ('%' || t1.col || '%')

This has a few problems

- first
   'apple,banana,lemon,grapefruit' LIKE '%grapefruit%' is TRUE
but
   'apple,banana,lemon,grapefruit' LIKE '%grape%' is also TRUE

- second
  this is effectively a cross-product join and can get very, very expensive