‎2018 Feb 13 9:43 PM
I'm trying to get <> function work, and it seems like I'm doing something wrong. I'm trying to not include values 411000 and 411005 by including them in a bracket with <> function. I'm told that the requirement is to use "OR" here. When I run the below code, the result includes both values. What am I doing wrong?
select u.IncidentNumber, u.PrimaryRoleOfUnit
from INC_UnitInformation u
where (u.PrimaryRoleOfUnit <> 411000 or u.PrimaryRoleOfUnit <> 411005)
‎2018 Feb 13 11:14 PM
select u.IncidentNumber, u.PrimaryRoleOfUnit
from INC_UnitInformation u
where (u.PrimaryRoleOfUnit <> 411000 and u.PrimaryRoleOfUnit <> 411005)
I believe the OR is your problem, when it is either of these 2 values the other side of the OR is TRUE so the value gets returned. Try the AND like I posted above.