Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple "Not like" Query 1

Status
Not open for further replies.
Feb 12, 2002
80
NO
hi,

Simple one:

I have two large tables joined by a query.
I wish to EXCLUDE certain values in a specific field.

So far I have come up with the folowing:
Code:
AND ( (  EGIS_EXPORT.[Kind Cd] ) Not Like "ACQPD"   )
AND ( (  EGIS_EXPORT.[Kind Cd] ) Not Like "ACQSUP"  )
AND ( (  EGIS_EXPORT.[Kind Cd] ) Not Like "ASCCOV"  )
AND ( (  EGIS_EXPORT.[Kind Cd] ) Not Like "ASCSTT"  )

I know this is a poor way of doing this - and I have many different values to add.

How should I do it?

I do not want to delete the data, just exclude it on this query.

Many thanks,
lil'
 
A more convenient way may be
Code:
EGIS_EXPORT.[Kind Cd] NOT IN ('ACQPD','ACQSUP','ASCCOV','ASCSTT')
Using LIKE without a wild card character (e.g. *, _, ?, etc.) makes it equivalent to the equal (=) operator.

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top