Microsoft
Software
Hardware
Network
Question : SQL <>
I am trying to select records where the 3 and forth characters are not equal to N7
Here is my code.
WHERE (LEFT(RIGHT(_Code, 3), 2) <> 'N7' OR LEFT(RIGHT(_Code, 3), 2) <>'N8')
It does not work.
I tested
WHERE (LEFT(RIGHT(_Code, 3), 2) <> 'N7' ) and It works.
Why can I not put the N7 and N8 condition next to each other?
Answer : SQL <>
You need to use AND, not OR. One of both conditions is true if the other is false ...
Random Solutions
Imported Excel spreadsheet null values unsearchable in Access
iPhone will not sync wil Exchange 2003
Report from Crosstab Query
Date Format problem in Microsoft Access 2000
How do I get rid of this security warning in Access 2007 (See Image)?
faster version of controltip to display tooltip text
VS2008 opens .aspx files in new IE window instead of Designer/Source Editor
I have a select query that I would like to add string data to
Simple Audit Trail for Access 2007
Opening Organization chart with open office