|
-
Dec 14th, 2016, 02:38 PM
#1
Re: How do I extract only numbers from a field? (Ms Access Sql query)
Mid(Field1, 1, Len(Field1)) isn't much use, at it is just a very long-winded way of writing Field1
Field1 Like '%[0-9]%' would be a very good thing to put in a Where clause for this (as it will quickly eliminate any rows that don't have numbers in them), but in the Select clause won't do much good (it will return True/False [or 0/1] depending on whether there are any numeric characters in the field).
As to how you should approach this, it depends heavily on the kind of values you have got and exactly what you want to return based on those values.
-
Dec 14th, 2016, 02:45 PM
#2
Thread Starter
Lively Member
Re: How do I extract only numbers from a field? (Ms Access Sql query)
Input:
1234 Apple Hill Road.
Output:
1234
-
Dec 14th, 2016, 03:56 PM
#3
Thread Starter
Lively Member
Re: How do I extract only numbers from a field? (Ms Access Sql query)
Some will be like this
Input:
Po Box 1234
Output:
1234
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|