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
SQL syntax
Attach txt file with sendmail
Windows7 in a 2003 domain
Outlook closes as soon as it starts
How do I force a '0' value into a report
Exchange 2007 - Transport Rule
GetPivotdata Formula
How to open website (hosted on Win Server 2008, IIS) in Microsoft Frontpage 2000?
Windows cardspace has stoppped working
How to hyperlink a database of 1000's of Fedex tracking numbers to their own tracking Fedex webpage for beginner?