1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

'Not ilike any' clause with wildcard from an array doesn't work

Discussão em 'Outras Linguagens' iniciado por Stack, Janeiro 25, 2021.

  1. Stack

    Stack Membro Participativo

    Just as in title, following code doesn't filter anything at all, it returns all rows while without 'NOT' it works just fine. Where's the problem?

    create table test (value text);

    insert into test values
    ('Test1'),
    ('foo'),
    ('bar'),
    ('foobar'),
    ('foobar2'),
    ('foobar3'),
    ('foo1bar'),
    ('foo bar'),
    ('barbar');

    select *
    FROM test
    WHERE value NOT like any (array['%foo%', '%foo bar%', '%xx%'])


    https://www.db-fiddle.com/f/gCFy3K97gQy7gxomAL2Qm7/0

    Continue reading...

Compartilhe esta Página