Text Based Queries

W

William Foster

Good evening all,

I have a query I need to create that can read individual text characters and
return their codes so that I am able to assess whether they are valid or not.
As an example I want to be able to test whether a string conforms to the
standard AAA000. In Microsoft Excel I can do this by using the Mid and Code
functions, however, these do not exist within Microsoft Access (That I can
find anyway).

Any suggestions on how I may be able to address this issue using an
expression within a query would be greatly appreciated.

Yours sincerely,

William Foster
 
B

bcap

I assume that what you mean by "the standard AAA000" is that it should be
three alpha characters followed by three numeric characters.

This can easily be done using the LIKE operator with an appropriate pattern:

LIKE "[a-z][a-z][a-z]###"
 
W

William Foster

BCap

Thank you; that answers the question perfectly!

Yours sincerely,

William Foster

bcap said:
I assume that what you mean by "the standard AAA000" is that it should be
three alpha characters followed by three numeric characters.

This can easily be done using the LIKE operator with an appropriate pattern:

LIKE "[a-z][a-z][a-z]###"


William Foster said:
Good evening all,

I have a query I need to create that can read individual text characters
and
return their codes so that I am able to assess whether they are valid or
not.
As an example I want to be able to test whether a string conforms to the
standard AAA000. In Microsoft Excel I can do this by using the Mid and
Code
functions, however, these do not exist within Microsoft Access (That I can
find anyway).

Any suggestions on how I may be able to address this issue using an
expression within a query would be greatly appreciated.

Yours sincerely,

William Foster
 

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

Top