Forum Discussion
mdor
5 years agoFrequent Visitor
SQL NOT LIKE in M language
Hello, I have an SQL query that contains the NOT LIKE function. I have googled for an hour and didn't find a good solution. Can anyone help me with this task? Here is my SQL query: SELECT
*
F...
- 5 years ago
In Power Query, it would be:
Table.SelectRows(TableName, each not Text.StartsWith([Description], "") and not Text.StartsWith([Product], "CMI"))
Power Query doesn't have a LIKE operator. You'd use Text.Contains, Text.StartsWith, or Text.EndsWith depending on what you are trying to do. It does have a NOT operator, which is simply not - all lower case.
edhans
5 years agoCommunity Champion
In Power Query, it would be:
Table.SelectRows(TableName, each not Text.StartsWith([Description], "") and not Text.StartsWith([Product], "CMI"))
Power Query doesn't have a LIKE operator. You'd use Text.Contains, Text.StartsWith, or Text.EndsWith depending on what you are trying to do. It does have a NOT operator, which is simply not - all lower case.