Brug like any
:
SELECT uchastki.kadnum
FROM uchastki
WHERE kadnum LIKE ANY(
SELECT str
FROM test
WHERE str IS NOT NULL)
Eller måske:
SELECT uchastki.kadnum
FROM uchastki
WHERE kadnum LIKE ANY(
SELECT '%' || str || '%'
FROM test
WHERE str IS NOT NULL)
dette er en fin funktion. Du kan bruge forskellige operatorer, for eksempel = any (select ... )
, eller <> all (select...)
.