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
Microsoft Access form navigation VBA question - making fields active or inactive
DLL kill
Tricky DCount for me - maybe not you
Special characters in combo boxes
upgrade XP to Windows Server 2008?
VBA code to customize tab order
Conditional formatting to copy the format of another cell
Programmaticaly close TCP Connection(s)
How to embed Ms Access form in C# WinForms application ?
Exchange 2010: 550 5.7.1 Client does not have permissions to send as this sender