Bara ett steg längre, kom närmare ditt svar.
SQL FIDDLE DEMO
SELECT P.*
FROM Product P
CROSS APPLY(
SELECT *
FROM ShelfSearch SS
WHERE Patindex(char(37)+replace(ss.shelflist, ',',char(37))+char(37),p.shelflist) > 0
)Shelfs
Bara ett steg längre, kom närmare ditt svar.
SQL FIDDLE DEMO
SELECT P.*
FROM Product P
CROSS APPLY(
SELECT *
FROM ShelfSearch SS
WHERE Patindex(char(37)+replace(ss.shelflist, ',',char(37))+char(37),p.shelflist) > 0
)Shelfs