query to find numbers and not alphanumeric

access 2010:

I need a query that will only find me records that have a numeric pattern in then.

I need to find these:
Item
10000010
10000072
10000100
10000110
10000251
10000252
10000259
99999333
etc...



and not alphanumeric  combinations
Item
1CFJ4
1CFJ5
2ccc45
3wwe2

etc...

I was trying this but not working.

SELECT OneToOneMatches_2013.Item, OneToOneMatches_2013.del
FROM OneToOneMatches_2013
WHERE (((OneToOneMatches_2013.Item) Like '%[^a-zA-Z0-9]%'));

Thanks
fordraiders
LVL 3
FordraidersAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeff DarlingDeveloper AnalystCommented:
here is a sample on how to do that.  Regex gets sent to a function.
ee-2015030201.accdb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rey Obrero (Capricorn1)Commented:
try

SELECT OneToOneMatches_2013.Item, OneToOneMatches_2013.del
 FROM OneToOneMatches_2013
 WHERE IsNumeric(OneToOneMatches_2013.Item) = True
0
PatHartmanCommented:
you can use the IsNumeric() function.  Just be aware that decimal points are considered numeric for this purpose and d, e, and -, can make Access think the field is scientific notation which would be considered numeric.

The safest method is to write your own function that loops through each character and only if each individual character is numeric, is the whole field numeric.

I'm not sure what you are trying to do with the Where clause.  The * is the wildcard you probably want to use in Access.  You also only want the digits 0-9.  You don't want the others.
0
IrogSintaCommented:
If you numeric value always consists of 8 characters, you can use this instead for your WHERE clause:
WHERE (OneToOneMatches_2013.Item) Like "????????"

Ron
0
FordraidersAuthor Commented:
worked great..Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.