This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Null field impact on queries

What is the impact of a null field on a string comparison? For example, we want to eliminate UPSes from showing up on our down nodes page widget.
We cobbled together the following query and there are rows in the table where the DevicePurpose field is null (the other three fields do not have any
rows in the table with null values). The question that is being asked does this have any effect on any of the nodes that have an assigned value of Null?

IsTest = 'False' and IsWorkstation = 'False' and MachineType <> 'VMware ESX Server' and DevicePurpose <> 'UPS'

or do we need to use the following query:

IsTest = 'False' and IsWorkstation = 'False' and MachineType <> 'VMware ESX Server' and (DevicePurpose is Null or (DevicePurpose is not Null and DevicePurpose <> 'UPS'))