Re: query filter not like

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Tue, 11 Mar 2008 06:52:02 -0700, Murata-PS
<Murata-PS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I have a field that contains 6 digits, then an astrik, then 3 digits, then an
astrik , then possible 2 digits, then an astrik and 1 digit. I need to
filter for all but the records that contain the last astrick and 1 digit. I
have tried "Not Like "######" & "*" & "###" & "*" & "#" & "*" & "#" - but no
luck - can anyone help ?

The trouble is that an asterisk is itself a wildcard, so searching for it will
treat it as a wildcard, matching any string of characters or nothing at all.
The getaround is to put it in square brackets so that it will be treated as a
literal asterisk, not a wildcard:

NOT LIKE "######[*]###[*]#"

will find all records except those with five digits, a literal asterisk, three
digits, a literal asterisk, and one digit.
--

John W. Vinson [MVP]
.



Relevant Pages

  • Re: basic regex back reference
    ... it tries to match either an asterisk or a digit. ... The "+" behoind it ...
    (comp.lang.perl.misc)
  • Enigma 1353 - Three cubed
    ... Harry, Tom and I each looked to replace each ... asterisk with a digit in such a way that the ... digit was the same as Tom's. ...
    (rec.puzzles)
  • RE: List of Commands?
    ... wildcard. ... when I used it in a Sumproduct function, ... The asterisk is used to represent a string of characters of any length ... contained a word from another cell. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Can this be done?
    ... don't replace the asterisk *. ... Its job is as a wildcard - to be ... "matched" if anything at all is encountered in a cell when moving up ...
    (microsoft.public.excel.misc)
  • Re: Search and replace
    ... This is a wildcard string. ... asterisk character The asterisk by itself is a wildcard meaning "any group ... The @ symbol means "one or more characters that match the preceding ...
    (microsoft.public.word.vba.beginners)