Hi Kevin!
There are a couple of ways you can accomplish what you are asking. When you are 'scanning' a character field for the occurrence of a certain group of characters, WHERE those characters appear in the field is a question to ask.
Since you have already said the first 4 characters are already the same for all records, we can use a function called substring (SUBSTR).
Steps:
1. Create a new derived field
2. Right click and select Expression Editor
3. The expression would be: SUBSTR(field, 1, 2) <--------this means to look at your current field, start at position 1 and return 2 characters.
If you want to just grab the first 4 characters, then it would be SUBSTR(field, 1, 4)
Be sure to give this newly created field an ALT NAME. For our example we will just call it ABC.
4. If you were to display it, it would return something like 10, 30, 20, etc.
5. To eliminate those records (you are looking to eliminate ones that start with 10 and 30 in your request), in your WHERE clause you would use:
WHERE ABC NOT IN('10', '30') or you could do WHERE ABC <> '10' if you just want to do one value.
Another way to use a 'wildcard' search, when maybe the string you are looking for can appear anywhere within the field, is to use the LIKE function. In your where clause you would do WHERE field LIKE '*string*' <------the string is what you are looking for in the field.
Please post back if you have any questions.
Thanks!