If WPP.COMMENT contains NULL, the condition will not match.

This query:

SELECT  1
WHERE   NULL NOT LIKE '%test%'

will return nothing.

On a NULL column, both LIKE and NOT LIKE against any search string will return NULL.

Could you please post relevant values of a row which in your opinion should be returned but it isn't?

Answer from Quassnoi on Stack Overflow
🌐
LearnSQL.com
learnsql.com › blog › like-sql-not-like
What Do the Operators LIKE and NOT LIKE Do? | LearnSQL.com
March 4, 2021 - Notice how the second letter of the name can be anything. Our SQL query is ignoring that letter and looking for the pattern we have specified. Let’s look at another example. This time, we will substitute two characters with two underscore _ wildcard characters. SELECT FirstName, LastName FROM person_info WHERE LastName LIKE 'Wa__';
Discussions

How to put several LIKE & NOT LIKE statements in WHERE SQL clause?
Guys, I am doing a SELECT statement and need to combine several LIKE… & NOT LIKE things in my WHERE clause to wash the data. It will let me do: WHERE ColumnName NOT LIKE ‘string’ But when I try to add several of these it gives me an error. For ex: WHERE ColumnName NOT LIKE ‘string’, ... More on community.spiceworks.com
🌐 community.spiceworks.com
8
4
March 9, 2010
NOT LIKE Alternatives in WHERE clause – SQLServerCentral Forums
NOT LIKE Alternatives in WHERE clause Forum – Learn more on SQLServerCentral More on sqlservercentral.com
🌐 sqlservercentral.com
May 30, 2023
SQL LIKE ANd NOT LIKE - SQLTeam.com Forums
Hi All, I am wondering if someone could help me with an SQL query. I need to return results from a table with words which have 'an' in them; so I am using '%an%' but i don't want the word 'AND' to show up which it is doing. How can I have one but leave out 'and'? Thanks! More on forums.sqlteam.com
🌐 forums.sqlteam.com
0
February 24, 2020
NOT LIKE with '%'
but for finding cities that do not start or end with vowel I can't just add a NOT into the above SQL, instead I have to do ... your colloquial use of 'OR' trips you up here, i think. your last query finds cities that NEITHER start NOR end with a vowel. Which, indeed, is NOT a reversal of your original query. More on reddit.com
🌐 r/SQL
9
1
March 7, 2024
🌐
Educative
educative.io › answers › what-is-not-like-operator-in-sql
What is NOT LIKE operator in SQL?
Donald D. Chamberlin and Raymond F. Boyce designed SQL, which includes a range of filtering operators to refine query results. Among these operators, the NOT LIKE operator excludes rows based on specific patterns, enhancing the ability to filter data effectively.
🌐
Microsoft
social.msdn.microsoft.com › Forums › en-US › a8a08574-cda6-4fea-a243-4723d910d208 › sql-like-not-working-for-me-with-
sql like not working for me with % - MSDN - Microsoft
September 19, 2017 - String sql = "Select * from mytbl WHERE keyword LIKE '%" + question + "%' OR keyword2 LIKE '%" + question +"%'";
🌐
UniversalClass
universalclass.com › articles › computers › sql › using-the-in-not-and-like-operators-in-sql.htm
Using the IN, NOT, and LIKE Operators in SQL
Some SQL keywords that help you build complex statements include IN, NOT, and LIKE. LIKE uses wildcards, which are used to query similar values, but IN and NOT return precise record sets based on specific values. ... The IN condition lets you set a list of values that must match values in your tables. The IN condition lists values in parenthesis, and it's better than working ...
🌐
W3Schools
w3schools.com › sql › sql_like.asp
SQL LIKE Operator
SQL Examples SQL Editor SQL Quiz SQL Exercises SQL Server SQL Syllabus SQL Study Plan SQL Bootcamp SQL Certificate SQL Training ... The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.
Find elsewhere
🌐
TechOnTheNet
techonthenet.com › sql › not.php
SQL: NOT Condition
Let's look for all records in the suppliers table where the supplier_name does not contain the letter 'o'. Enter the following SQL statement: Try It · SELECT * FROM suppliers WHERE supplier_name NOT LIKE '%o%';
🌐
SQL Server Tutorial
sqlservertutorial.net › home › sql server basics › sql server like operator
SQL Server LIKE Operator
March 2, 2024 - The query returns comments that contain 30% and 30 USD, which is not what we expected. To address this issue, you can use the ESCAPE clause: SELECT feedback_id, comment FROM sales.feedbacks WHERE comment LIKE '0!%%' ESCAPE '!';Code language: SQL (Structured Query Language) (sql)
🌐
w3resource
w3resource.com › mysql › comparision-functions-and-operators › not-like.php
MySQL not like operator - w3resource
May 24, 2024 - The following MySQL statement excludes those rows from the table author having the country name like the above pattern as specified with LIKE operator. ... -- This SQL query selects the name, country, and home city of authors -- Explanation: The query retrieves information from the 'author' table, filtering out authors whose countries match specific patterns. SELECT aut_name, country, home_city -- Selecting specific columns aut_name, country, and home_city from the 'author' table FROM author -- Specifying the table 'author' from which to retrieve the data WHERE country NOT LIKE 'U_A' -- Filtering the rows based on the country column, excluding rows where the country matches the pattern 'U_A' AND country NOT LIKE 'C__a_a'; -- Further filtering based on the country column, excluding rows where the country matches the pattern 'C__a_a'
🌐
JournalDev
journaldev.com › home › sql › sql like – sql not like
SQL Like - SQL Not Like | DigitalOcean
August 4, 2022 - SELECT CustomerName FROM Customer WHERE CustomerName NOT LIKE 'A%'; ... We can have multiple like statements in SQL query.
🌐
Microsoft Docs
docs.microsoft.com › en-us › u-sql › operators › logical › like-not-like
LIKE, NOT LIKE (U-SQL) - U-SQL | Microsoft Learn
February 10, 2021 - An Azure subscription and Azure Data Lake Analytics account is not needed when executed locally. @data = SELECT * FROM (VALUES ("Carsen", "Engineer"), ("Larsen", "engineer"), ("Karsen", "some%value"), ("Barbariol", "somevalue"), ("Barber", "some_value"), ("Olivia", "someXvalue") ) AS T(col1, col2); // Change "LIKE" to "NOT LIKE" for NOT LIKE examples @result = SELECT * FROM @data WHERE col1 LIKE "_arsen"; OUTPUT @result TO "/ReferenceGuide/Operators/Logical/Like1.txt" USING Outputters.Tsv(); @result = SELECT * FROM @data WHERE col1 LIKE "[C-K]arsen"; OUTPUT @result TO "/ReferenceGuide/Operator
🌐
SQLServerCentral
sqlservercentral.com › forums › topic › not-like-alternatives-in-where-clause
NOT LIKE Alternatives in WHERE clause – SQLServerCentral Forums
May 30, 2023 - DROP TABLE IF EXISTS returned_products; GO CREATE TABLE returned_products( returned_products_id INT IDENTITY(1,1), returned_products_reason VARCHAR(1000)) ALTER TABLE returned_products ADD CONSTRAINT returned_products_PK PRIMARY KEY (returned_products_id); DECLARE @c_reason_1 VARCHAR(100) = 'reason_1', @c_reason_2 VARCHAR(100) = 'reason_2', @c_reason_3 VARCHAR(100) = 'reason_3'; INSERT INTO returned_products(returned_products_reason) VALUES(@c_reason_1), (@c_reason_2), (@c_reason_1+@c_reason_3), (@c_reason_1+@c_reason_3+@c_reason_2) SELECT rp.* FROM returned_products rp WHERE rp.returned_products_reason NOT LIKE '%'+@c_reason_3+'%' AND rp.returned_products_reason NOT LIKE '%'+@c_reason_2+'%'
🌐
SQLTeam
forums.sqlteam.com › t › sql-like-and-not-like › 17338
SQL LIKE ANd NOT LIKE - SQLTeam.com Forums
February 24, 2020 - Hi All, I am wondering if someone could help me with an SQL query. I need to return results from a table with words which have 'an' in them; so I am using '%an%' but i don't want the word 'AND' to show up which it is d…
🌐
Esri Community
community.esri.com › t5 › data-management-questions › sql-like-function-not-working-help › td-p › 700666
Solved: SQL Like Function not working! Help - Esri Community
November 11, 2014 - [Unit_Name] LIKE '*Limestone*' is the expression that I am using. However, even though there are many records that have the word limestone in it, it says that there are 0 results. I tried [Unit_Name] ='*Limestone*' and this seems to work fine, but when I use like it doesn't..
🌐
Reddit
reddit.com › r/sql › not like with '%'
r/SQL on Reddit: NOT LIKE with '%'
March 7, 2024 -

So using MS SQL Server, I am wondering why this works (get cities that start and end with vowel)

SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE '[AEIOU]%[AEIUO]'

but for finding cities that do not start and end with vowel I can't just add a NOT into the above SQL, instead I have to do

SELECT DISTINCT CITY FROM STATION WHERE CITY NOT LIKE '[AEIOU]%' AND CITY NOT LIKE '%[AEIUO]'

🌐
W3Schools
w3schools.com › sql › sql_not.asp
SQL NOT Operator
SQL Examples SQL Editor SQL Quiz ... SQL Certificate SQL Training ... The NOT operator is used in combination with other operators to give the opposite result, also called the negative result....
🌐
Vertica Forum
forum.vertica.com › general discussion
Query with 2 NOT LIKE conditions returns 0 results — Vertica Forum
October 6, 2023 - I haven't found anything related to the LIKE and ILIKE operators that would be affected by null values ... Yes, this is expected behavior, and it works the same in all RDBMS I know of. Null is a special marker for absence of value, thus you can't compare it. So when you write MyCol <> 'ABC' in reality it means MyCos is not null and MyCol <> 'ABC', because making a comparaison removed the nulls from the equation.