Access Query to return only numeric values

I realize this is a bit of a strange request but....

I have a table that has a text field that contains values that are either text or numbers

For example

ID  Description
1      2
2      Shop
3      Manager
4      5

I need to a query that would retrieve only rows that have a description value field that contains a number.

In the example above,

ID  Description
1      2
4      5
johnnyg123Asked:
Who is Participating?
 
Patrick MatthewsConnect With a Mentor Commented:
SELECT ID, Description
FROM SomeTable
WHERE IsNumeric(Description) = True
0
 
Rey Obrero (Capricorn1)Commented:
select ID, Description from tablex
where isnumeric([description])=-1
0
 
Patrick MatthewsCommented:
>>I need to a query that would retrieve only rows that have a description value field that contains
>>a number.

My code above tests whether the whole entry is numeric.  Now, if by "contains a number" you really mean "contains a digit character", that is a different story:

SELECT ID, Description
FROM SomeTable
WHERE Description Like "*[0-9]*"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.