Text Based Queries

  • Thread starter Thread starter William Foster
  • Start date Start date
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
 
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]###"
 
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
 
Back
Top