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
Extract Birthdays between now and 30 days from today
Started getting BSODs - nvatabus.sys ?
Getting a First Chance Exception when trying to add a record to access with VB.NET
event id 1073 user unable to restart
Modify outgoing messages in Outlook with a VB add-in
How do I get the time only from a SQL datetime value?
VFP dynamic inputmask
How to run a MS Access Query?
Why the log-in time on our domain takes too long to log using my LAN port
Doing Some math in a Select