Closed salberski closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
apex-soql-lib | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 8, 2023 1:09pm |
@osieckiAdam @pgajek2 @janeksledziewski Please Guys, review this s...tuff
NOT LIKE
operator is not that popular capability of the Salesforce SOQL. It works the same wayLIKE
operator does. We can useNOT LIKE
operator to extract those rows which do NOT have a particular substring in the filtered field.The tricky part is the syntax (unfortunately I hadn't found this in the official documentation).
NOT
operator needs to be added before the field that we're trying to filter and needs to be wrapped with the parentheses to properly work with the group of filters.Examples:
SELECT Id FROM Account WHERE Type = 'Customer' AND (NOT Name LIKE '%Ltd%')