Redshift - Filter multiple Not in condition
up vote
0
down vote
favorite
I am trying to build a query that filters out any email that has gmail or yahoo in the name. I tried the below:
select email from users where email not like ('@gmail.com','@yahoo.com')
I get an error
ERROR - operator does not exist: character varying
I am using Redshift DB. Thanks..
amazon-redshift
add a comment |
up vote
0
down vote
favorite
I am trying to build a query that filters out any email that has gmail or yahoo in the name. I tried the below:
select email from users where email not like ('@gmail.com','@yahoo.com')
I get an error
ERROR - operator does not exist: character varying
I am using Redshift DB. Thanks..
amazon-redshift
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to build a query that filters out any email that has gmail or yahoo in the name. I tried the below:
select email from users where email not like ('@gmail.com','@yahoo.com')
I get an error
ERROR - operator does not exist: character varying
I am using Redshift DB. Thanks..
amazon-redshift
I am trying to build a query that filters out any email that has gmail or yahoo in the name. I tried the below:
select email from users where email not like ('@gmail.com','@yahoo.com')
I get an error
ERROR - operator does not exist: character varying
I am using Redshift DB. Thanks..
amazon-redshift
amazon-redshift
asked Nov 9 at 9:06
Kevin Nash
1578
1578
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
where email not like '%@gmail.com'
and email not like '%@yahoo.com'
there is no combination of a list with like
, it works only for exact matches (in
), and don't forget the wildcard (%
)
if the list is larger there is another solution with a given answer (can look it up here if so)
thank you that helped.
– Kevin Nash
Nov 9 at 14:22
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
where email not like '%@gmail.com'
and email not like '%@yahoo.com'
there is no combination of a list with like
, it works only for exact matches (in
), and don't forget the wildcard (%
)
if the list is larger there is another solution with a given answer (can look it up here if so)
thank you that helped.
– Kevin Nash
Nov 9 at 14:22
add a comment |
up vote
1
down vote
accepted
where email not like '%@gmail.com'
and email not like '%@yahoo.com'
there is no combination of a list with like
, it works only for exact matches (in
), and don't forget the wildcard (%
)
if the list is larger there is another solution with a given answer (can look it up here if so)
thank you that helped.
– Kevin Nash
Nov 9 at 14:22
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
where email not like '%@gmail.com'
and email not like '%@yahoo.com'
there is no combination of a list with like
, it works only for exact matches (in
), and don't forget the wildcard (%
)
if the list is larger there is another solution with a given answer (can look it up here if so)
where email not like '%@gmail.com'
and email not like '%@yahoo.com'
there is no combination of a list with like
, it works only for exact matches (in
), and don't forget the wildcard (%
)
if the list is larger there is another solution with a given answer (can look it up here if so)
answered Nov 9 at 13:39
AlexYes
2,1142715
2,1142715
thank you that helped.
– Kevin Nash
Nov 9 at 14:22
add a comment |
thank you that helped.
– Kevin Nash
Nov 9 at 14:22
thank you that helped.
– Kevin Nash
Nov 9 at 14:22
thank you that helped.
– Kevin Nash
Nov 9 at 14:22
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53222692%2fredshift-filter-multiple-not-in-condition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown