query for unusual characters

  • Thread starter Thread starter David Shorthouse
  • Start date Start date
D

David Shorthouse

Hello folks,

I received a db export from something other than Access or SQL Server
(must have been Unix-based or something). Some of the text-based fields
contain unusual characters and I'd like to construct a query to find records
that contain text within their strings other than A-Z. Is this possible? For
example, there may be records like "Sm^th" or "J$hn" and I'd like to query
those. Since there are many records (10,000+) and since there may be many
such unusual characters, this is not as easy as just querying for "*$*" or
"*^*".

Thanks for any ideas,

Dave
 
Like "*[!A-Z]*"

For clarity, that's

Like " * [ ! A - Z ] * "
 
Well, that works great! But what if there are some characters in the string
like "&" that I don't mind being included so long as elsewhere in the same
cell there aren't the characters I need to search for.

Thanks again,

Dave

--
______________________________
Remove "_SPAM" to reply directly.
Douglas J Steele said:
Like "*[!A-Z]*"

For clarity, that's

Like " * [ ! A - Z ] * "


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


David Shorthouse said:
Hello folks,

I received a db export from something other than Access or SQL Server
(must have been Unix-based or something). Some of the text-based fields
contain unusual characters and I'd like to construct a query to find records
that contain text within their strings other than A-Z. Is this possible? For
example, there may be records like "Sm^th" or "J$hn" and I'd like to
query
those. Since there are many records (10,000+) and since there may be many
such unusual characters, this is not as easy as just querying for "*$*"
or
"*^*".

Thanks for any ideas,

Dave
 
To include &, use

Like "*[!A-Z&]*"

To include & and $, use

Like "*[!A-Z&$]*"

To include...well, you get the idea.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


David Shorthouse said:
Well, that works great! But what if there are some characters in the string
like "&" that I don't mind being included so long as elsewhere in the same
cell there aren't the characters I need to search for.

Thanks again,

Dave

--
______________________________
Remove "_SPAM" to reply directly.
Douglas J Steele said:
Like "*[!A-Z]*"

For clarity, that's

Like " * [ ! A - Z ] * "


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


David Shorthouse said:
Hello folks,

I received a db export from something other than Access or SQL Server
(must have been Unix-based or something). Some of the text-based fields
contain unusual characters and I'd like to construct a query to find records
that contain text within their strings other than A-Z. Is this
possible?
For
example, there may be records like "Sm^th" or "J$hn" and I'd like to
query
those. Since there are many records (10,000+) and since there may be many
such unusual characters, this is not as easy as just querying for "*$*"
or
"*^*".

Thanks for any ideas,

Dave
 

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