If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Text Based Queries
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 |
#2
|
|||
|
|||
Text Based Queries
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" wrote in message ... 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 |
#3
|
|||
|
|||
Text Based Queries
BCap
Thank you; that answers the question perfectly! Yours sincerely, William Foster "bcap" wrote: 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" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|