I want to know if column a (VARCHAR) is contained within column B (VARCHAR), e.g. foo
in foobar
. I thought I could do
SELECT '%' || a || '%' LIKE b
but it is always False, unless a and b are identical. And as a simpler example:
SELECT
'%foo%' LIKE 'one foo two'
is also False.
So how do I test this?