Query for numbers (not text)

  • Thread starter Thread starter Gary W
  • Start date Start date
G

Gary W

Sorry in advance for such a basic question, but I just
have not been able to find any documentation on this one.

The data in my field looks like this:
70123
70489
70XYZ
70925
70ABC

Every value begins with "70" but in some cases, the
remaining 3 characters are text rather than numbers. In
my select query I only want the cases that have all
numeric values to appear.

I only want these to appear:
70123
70489
70925

Not these:
70XYZ
70ABC


Thanks in advance for any assistance.

Gary
 
You might use criteria like this on your field:

Not Like "*[!0-9]*"

In other words, you only want records where your field does not contain
characters that are not digits (or conversely that contain only digits).

If you know all values of your field have exactly five characters, you might
instead use:

Like "#####"

This will only return records where your field contains exactly five
characters that are digits.
 
Back
Top