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
Excel VBA -- Using .xlT File to Send E-Mail with .xlS File Attachment (NEW QUESTION)
Sybase 11 Error
How can I make Visual Studio 2008 Fullversion to Trail?
Prevent User from writing in textbox
Setting the "Order by" Order
Will Microsoft Great Plains 7.5 run on Windows 7?
Converting ANSI-89 to ANSI-92 T-SQL queries
RDP 7 Audio Compression - Latency
I added a record and cannot see it in the form
Installer for WinForm Application written in C# .net 2.