<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic nulls and the select not counting nulls in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804554#M66306</link>
    <description>We have a table called trans and in it we have column SIG that allows nulls, so why if SEG is null it is not counted here with this statement?&lt;BR /&gt;&lt;BR /&gt;select count(*) from trans where SIG &amp;lt;&amp;gt; 'RTS';&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  COUNT(*)&lt;BR /&gt;----------&lt;BR /&gt;       263&lt;BR /&gt;&lt;BR /&gt;select count(*) from trans where SIG is null;&lt;BR /&gt;&lt;BR /&gt;  COUNT(*)&lt;BR /&gt;----------&lt;BR /&gt;    425126&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;select count(*) from trans where  (SIG &amp;lt;&amp;gt; 'RTS' or SIG is NULL);&lt;BR /&gt;&lt;BR /&gt;  COUNT(*)&lt;BR /&gt;----------&lt;BR /&gt;    425389&lt;BR /&gt;&lt;BR /&gt;Steve</description>
    <pubDate>Mon, 12 Jun 2006 15:35:28 GMT</pubDate>
    <dc:creator>Stephen Ray Badgett</dc:creator>
    <dc:date>2006-06-12T15:35:28Z</dc:date>
    <item>
      <title>nulls and the select not counting nulls</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804554#M66306</link>
      <description>We have a table called trans and in it we have column SIG that allows nulls, so why if SEG is null it is not counted here with this statement?&lt;BR /&gt;&lt;BR /&gt;select count(*) from trans where SIG &amp;lt;&amp;gt; 'RTS';&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  COUNT(*)&lt;BR /&gt;----------&lt;BR /&gt;       263&lt;BR /&gt;&lt;BR /&gt;select count(*) from trans where SIG is null;&lt;BR /&gt;&lt;BR /&gt;  COUNT(*)&lt;BR /&gt;----------&lt;BR /&gt;    425126&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;select count(*) from trans where  (SIG &amp;lt;&amp;gt; 'RTS' or SIG is NULL);&lt;BR /&gt;&lt;BR /&gt;  COUNT(*)&lt;BR /&gt;----------&lt;BR /&gt;    425389&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Mon, 12 Jun 2006 15:35:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804554#M66306</guid>
      <dc:creator>Stephen Ray Badgett</dc:creator>
      <dc:date>2006-06-12T15:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: nulls and the select not counting nulls</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804555#M66307</link>
      <description>Can be, so NULL isn't defined and the comparsion with &amp;lt;&amp;gt; wouldn't work with this (because is not true)?&lt;BR /&gt;&lt;BR /&gt;or, what ist the result of:&lt;BR /&gt;&lt;BR /&gt;select count(*) from trans where ((SIG &amp;lt;&amp;gt; 'RTS') or (SIG is NULL));&lt;BR /&gt;&lt;BR /&gt;What DB is running?&lt;BR /&gt;&lt;BR /&gt;Greetings&lt;BR /&gt;Thomas&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jun 2006 01:21:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804555#M66307</guid>
      <dc:creator>Reiß, Thomas</dc:creator>
      <dc:date>2006-06-13T01:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: nulls and the select not counting nulls</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804556#M66308</link>
      <description>&lt;BR /&gt;Just a thought - are you sure that the values are really null? If there is an home-grown application on top fo the base, could it be that the application developers actually have insert a text literal value kalled '&lt;NULL&gt;' instead of the database null value. Have seen this a couple of times. When doing a select it can be difficult to distinguish between the null value and a text literal called null if you do not think about it. &lt;BR /&gt;&lt;/NULL&gt;</description>
      <pubDate>Tue, 13 Jun 2006 02:46:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804556#M66308</guid>
      <dc:creator>Karsten Breivik_1</dc:creator>
      <dc:date>2006-06-13T02:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: nulls and the select not counting nulls</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804557#M66309</link>
      <description>What database are you using?</description>
      <pubDate>Tue, 13 Jun 2006 04:44:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804557#M66309</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-06-13T04:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: nulls and the select not counting nulls</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804558#M66310</link>
      <description>NULL is a strange beast.  It's not equal to anything, not even itself.  You should always use IS NULL or IS NOT NULL rather than = when testing for NULL values.&lt;BR /&gt;&lt;BR /&gt;--Don</description>
      <pubDate>Tue, 13 Jun 2006 11:43:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nulls-and-the-select-not-counting-nulls/m-p/3804558#M66310</guid>
      <dc:creator>Donald Crook</dc:creator>
      <dc:date>2006-06-13T11:43:00Z</dc:date>
    </item>
  </channel>
</rss>

