Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Using wildcard characters in search

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pete Provencher - 27 Jul 2006 21:11 GMT
I'm trying to wirte a query that will display a certain text string. I want
to find all the records that one field is formatted in a certain way. I need
to see the records that start with 3 numeric values followed by 2 alpha
characters and then 3 numeric values ie 123AA456. In the criteria cell I
write Like "###??###" . This doesn't work as it displays records where all
the characters in ther field are numeric. Does anyone know how to do what I
need?

Pete Provencher
Pete Provencher - 27 Jul 2006 21:32 GMT
I figured it out. I used Like "###[a-z][a-z]###"

> I'm trying to wirte a query that will display a certain text string. I
> want to find all the records that one field is formatted in a certain way.
[quoted text clipped - 5 lines]
>
> Pete Provencher
Jamie Collins - 28 Jul 2006 12:02 GMT
> I figured it out. I used Like "###[a-z][a-z]###"

A slight improvement would be

LIKE '[0-9][0-9][0-9][A-Z][A-Z][0-9][0-9][0-9]'

This has the advantage of being able to work in both 'ANSI' (e.g. ADO)
and non-'ANSI' (e.g. DAO) modes.

Jamie.

--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.