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 / June 2007

Tip: Looking for answers? Try searching our database.

Help with easy query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
marcusahle - 26 Jun 2007 19:26 GMT
Thanks to all in advance for reading and replying to this.  In a query
I need to make sure one of the fields follows a format of ##-
Anything    The first two digits can be any number 0-9 followed
directly by "-" which can be followed by anything for example:
45-2GJF454 or 91-HDN34D   What do I need to put in my criteria box to
get it to follow that pattern
Steve - 26 Jun 2007 20:26 GMT
Use the following critria:
Like "##-*"

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com

> Thanks to all in advance for reading and replying to this.  In a query
> I need to make sure one of the fields follows a format of ##-
> Anything    The first two digits can be any number 0-9 followed
> directly by "-" which can be followed by anything for example:
> 45-2GJF454 or 91-HDN34D   What do I need to put in my criteria box to
> get it to follow that pattern
marcusahle - 26 Jun 2007 20:44 GMT
> Use the following critria:
> Like "##-*"
[quoted text clipped - 12 lines]
>
> - Show quoted text -

Thank you much!
John Spencer - 26 Jun 2007 20:47 GMT
Or if there must be at least one character after the "-"
  Like "##-?*"

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> Use the following critria:
> Like "##-*"
[quoted text clipped - 10 lines]
>> 45-2GJF454 or 91-HDN34D   What do I need to put in my criteria box to
>> get it to follow that pattern
Dale Fye - 27 Jun 2007 13:24 GMT
You could also use: Like "[0-9][0-9]-?*"

This is a neat feature of SQL that you can look for specific values in a
particular location in the string.  For example, if you wanted to find all
the entries that contain an A, C, or E as the first character, you could use:
Like "[ACE]*"

> Thanks to all in advance for reading and replying to this.  In a query
> I need to make sure one of the fields follows a format of ##-
> Anything    The first two digits can be any number 0-9 followed
> directly by "-" which can be followed by anything for example:
> 45-2GJF454 or 91-HDN34D   What do I need to put in my criteria box to
> get it to follow that pattern
 
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.