Pulling numeric data out of text field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This may be a really basic question but does anyone have any idea how I can
pull only the numeric data out of a text field in Access? For example there
are stock numbers such as 800795999 and 89556FG86 but I only need to get the
stock numbers with numbers, no letters, any ideas? Thanks
 
This may be a really basic question but does anyone have any idea how I can
pull only the numeric data out of a text field in Access? For example there
are stock numbers such as 800795999 and 89556FG86 but I only need to get the
stock numbers with numbers, no letters, any ideas? Thanks

Use a query criterion

NOT LIKE "*[A-Z]*"


John W. Vinson[MVP]
 
Just further to that question:
How can I search for a street name only, if an address field has both the
street number and street name in it.
If there is an entry say... 123 Main Street and I want to input in the
search box "Main" or "Main Street", what would be the query criteria?


John Vinson said:
This may be a really basic question but does anyone have any idea how I can
pull only the numeric data out of a text field in Access? For example there
are stock numbers such as 800795999 and 89556FG86 but I only need to get the
stock numbers with numbers, no letters, any ideas? Thanks

Use a query criterion

NOT LIKE "*[A-Z]*"


John W. Vinson[MVP]
 
LIKE "*Main*"

or

LIKE "*Main Street*"

If you're trying to have a parameter box pop up, set the criteria of your
query to:

LIKE "*" & [What Street?] & "*"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Stub932 said:
Just further to that question:
How can I search for a street name only, if an address field has both the
street number and street name in it.
If there is an entry say... 123 Main Street and I want to input in
the
search box "Main" or "Main Street", what would be the query criteria?


John Vinson said:
This may be a really basic question but does anyone have any idea how I can
pull only the numeric data out of a text field in Access? For example there
are stock numbers such as 800795999 and 89556FG86 but I only need to get the
stock numbers with numbers, no letters, any ideas? Thanks

Use a query criterion

NOT LIKE "*[A-Z]*"


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top