If you need to create a list of accounts with an annual revenue between 1 and 2 millions, you can quickly add two conditions in your view:
But what if you’d like to see a list of accounts with the names from A through L? There is no Greater Than clause for the text fields so what can we do except adding 10 “ORed” Begins with conditions (one per letter)?

Building advanced text conditions is not that difficult, as it turns out.

Create a new system view and add Begins with condition and add [A-L] as the value. Naturally, that won’t work but save the view anyway.

Create new solution, add account entity and, if you happen to use CRM 2016, select only that view.

Export the solution, extract customizations.xml file and open in your favorite XML editor.

Find fetchxml for the view and locate the clause you entered. It will look like

<condition value="[[]A-L]%"
attribute="name" operator="like" />

As you can see, CRM escaped the square bracket so that SQL Server treats it as a square bracket and not a wildcard character set. Let’s fix that.

Why would you want to do it? How about the list of accounts where name starts with non-alphanumeric? Change condition to “[^A-Z0-9]%”. How about accounts where 3rd letter is ‘S’? “__s%” will do it for you. In fact, as you guessed it, any wildcard SQL operator should work.

Note: modifying fetchxml is supported but you no longer will be able to edit this view in the browser. It’s also too easy to get it wrong so, if in doubt, test your fetch using FetchXml Tester tool from XrmToolbox.