Select non numeric records

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

I have a table of data from which I want to extra only the Accounts that are
letters or a combination of letters and numbers.

The field is a text field and includes, for eg

1000
1456
ABC1
AB

I want to select only the records ABC1 and AB
How can I do this?

Thanks
 
I have tried a simple >="A" which seems to work except it doesn't catch the
records that begin with a number
eg 0AB1

How can I get around this?
 
IsNumeric([YourColumnName]) <> 0

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Thanks - works a treat
Tom Ellison said:
IsNumeric([YourColumnName]) <> 0

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


I have a table of data from which I want to extra only the Accounts that are
letters or a combination of letters and numbers.

The field is a text field and includes, for eg

1000
1456
ABC1
AB

I want to select only the records ABC1 and AB
How can I do this?

Thanks
 
Strictly SQL would probably be something like the following.

LIKE "*![0123456789]*"

news.microsoft.com said:
Thanks - works a treat
Tom Ellison said:
IsNumeric([YourColumnName]) <> 0

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


I have a table of data from which I want to extra only the Accounts that are
letters or a combination of letters and numbers.

The field is a text field and includes, for eg

1000
1456
ABC1
AB

I want to select only the records ABC1 and AB
How can I do this?

Thanks
 
Whoops, that should have had the ! inside the brackets

LIKE "*[!0-9]*"

OR
LIKE "*[!0123456789]*"

news.microsoft.com said:
Thanks - works a treat
Tom Ellison said:
IsNumeric([YourColumnName]) <> 0

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


I have a table of data from which I want to extra only the Accounts that are
letters or a combination of letters and numbers.

The field is a text field and includes, for eg

1000
1456
ABC1
AB

I want to select only the records ABC1 and AB
How can I do this?

Thanks
 
Thanks for this
Could you explain how it works please ?
John Spencer (MVP) said:
Whoops, that should have had the ! inside the brackets

LIKE "*[!0-9]*"

OR
LIKE "*[!0123456789]*"

news.microsoft.com said:
Thanks - works a treat
Tom Ellison said:
IsNumeric([YourColumnName]) <> 0

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


On Mon, 27 Sep 2004 10:27:25 +0100, "news.microsoft.com"

I have a table of data from which I want to extra only the Accounts
that are
letters or a combination of letters and numbers.

The field is a text field and includes, for eg

1000
1456
ABC1
AB

I want to select only the records ABC1 and AB
How can I do this?

Thanks
 
Try the help on wildcards.

But basically.

* = any number of characters including zero characters
! inside the bracket means NOT any of the following characters in the bracket

SO

Any number of characters followed by something that is Not a number character
(0-9) followed by any number of characters.

So Any letter in any string meets that criteria. Also, a space or any other
non-number character such as "%" would also meet the criteria.


Thanks for this
Could you explain how it works please ?
John Spencer (MVP) said:
Whoops, that should have had the ! inside the brackets

LIKE "*[!0-9]*"

OR
LIKE "*[!0123456789]*"

news.microsoft.com said:
Thanks - works a treat
IsNumeric([YourColumnName]) <> 0

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


On Mon, 27 Sep 2004 10:27:25 +0100, "news.microsoft.com"

I have a table of data from which I want to extra only the Accounts
that
are
letters or a combination of letters and numbers.

The field is a text field and includes, for eg

1000
1456
ABC1
AB

I want to select only the records ABC1 and AB
How can I do this?

Thanks
 
Back
Top