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.

exclude records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 06 Jul 2006 20:43 GMT
Good afternoon,

I'm trying to exclude results returned by a query.  I have a field  which
has the following values: Released, On hold, Maturity A, Maturity B and
Maturity C.

I wish to exclude all the records where the value = Maturity *.  As such I
added 'Not Like "Maturity*"' as the criteria for this field.  To my amazment,
instead of eliminating these records the query returns only those values.  
For fun I removed the "Not" in the criteria and I get the exact same records
returned???

How can I exclude the "Maturity*" records?  Why isn't my Not Like criteria
acceptable?

Thank you,

Daniel
John Vinson - 06 Jul 2006 21:23 GMT
>Good afternoon,
>
[quoted text clipped - 10 lines]
>How can I exclude the "Maturity*" records?  Why isn't my Not Like criteria
>acceptable?

It should be. There's evidently something else going on!

Could you open your Query in SQL view and post the entire SQL string
here?

                 John W. Vinson[MVP]    
tiger0268 - 06 Jul 2006 21:30 GMT
try:
Not Like "Maturity*"

If that don't work try
Not Like "Maturity" & "*"

If that don't work, you can always just eliminate each one individually:
Not "Maturity A" And Not "Maturity B"

>Good afternoon,
>
[quoted text clipped - 14 lines]
>
>Daniel
John Vinson - 06 Jul 2006 23:39 GMT
>try:
>Not Like "Maturity*"
[quoted text clipped - 4 lines]
>If that don't work, you can always just eliminate each one individually:
>Not "Maturity A" And Not "Maturity B"

minor correction: The "Not" operator and the "is not equal" operator
<> are different. The last of these should be

<> "Maturity A" AND <> "Maturity B"

or, if you prefer,

NOT IN("Maturity A", "Maturity B")

                 John W. Vinson[MVP]    
 
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.