Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscribers.email NOT LIKE ANY (ARRAY['%@gmail.com', '%@yahoo.com']) - List not filtered #1971

Closed
benstaf opened this issue Aug 4, 2024 · 1 comment

Comments

@benstaf
Copy link

benstaf commented Aug 4, 2024

Version:

  • listmonk: [eg: v3.0.0]
  • OS: repocloud

In Lists, Advanced partial SQL, when I enter the query:

  1. subscribers.email NOT LIKE ANY (ARRAY['%@gmail.com', '%@yahoo.com'])

then the list is not filtered as it should. Nothing is filtered

However, if I enter:

  1. subscribers.email LIKE ANY (ARRAY['%@gmail.com', '%@yahoo.com'])

then the query works correctly

and if I enter:

subscribers.email NOT LIKE '%@gmail.com' AND subscribers.email NOT LIKE '%@yahoo.com'

it works too

Queries 1 and 3 give the same result, but 1 is more concise, especially because I want to input a very big list (because of issues #1968 and #1961 )

@benstaf benstaf changed the title subscribers.email NOT LIKE ANY (ARRAY['%@gmail.com', '%@yahoo.com']) - List not filtered as it should subscribers.email NOT LIKE ANY (ARRAY['%@gmail.com', '%@yahoo.com']) - List not filtered Aug 4, 2024
@shornabho
Copy link

  1. subscribers.email NOT LIKE ANY (ARRAY['%@gmail.com', '%@yahoo.com'])

@benstaf That partial SQL seems to be incorrect in achieving your desired result. I think the query you're rather looking for is:
NOT (subscribers.email LIKE ANY (ARRAY['%@gmail.com', '%@yahoo.com']))

Hope that helps.

@benstaf benstaf closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants