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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to eliminate 5 specific customer codes from my query 1

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
In the following query, I am eliminating 2 generic types of customer codes using the % wildcard.

Now, I have to eliminate 5 specific customer codes instead of the generic customer codes that I am using below. Let's say the 5 specifc codes would be:

ABC123
ABC456
ABC008
DEF122
DEF081


Select cDocNum
, cCustCode
Into #TmpNoImages2
From #tmpNoImages (nolock)
Where cCustCode Not Like 'ABC%' And cCustCode Not Like 'DEF%'



X-)
 
Hi there,
You can use

Where cCustCode Not In
('ABC123','ABC456','ABC008','DEF122','DEF081')


It will work for your.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top