<?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 Re: SQL in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058017#M907995</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;maybe this question should be post to another forum, for instance &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pipetalk.quest-pipelines.com/~dba/login" target="_blank"&gt;http://pipetalk.quest-pipelines.com/~dba/login&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Try to give us some result from subquery or some example data ....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH &lt;BR /&gt;&lt;BR /&gt;Radim</description>
    <pubDate>Wed, 27 Aug 2003 17:36:36 GMT</pubDate>
    <dc:creator>Radim Jarosek</dc:creator>
    <dc:date>2003-08-27T17:36:36Z</dc:date>
    <item>
      <title>SQL</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058016#M907994</link>
      <description>SELECT count(prod_code)&lt;BR /&gt;   FROM tSi_Daily_Hist S&lt;BR /&gt;   WHERE company_code = '0102' &lt;BR /&gt;    AND NOT EXISTS &lt;BR /&gt;      (SELECT prod_code&lt;BR /&gt;       FROM tproduct P);&lt;BR /&gt;&lt;BR /&gt;I have couple of prod codes available in&lt;BR /&gt;tSi_Daily_Hist which are NOT in tproduct.&lt;BR /&gt;But still above query return 0.&lt;BR /&gt;Anything wrong with the query?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 27 Aug 2003 15:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058016#M907994</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-08-27T15:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058017#M907995</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;maybe this question should be post to another forum, for instance &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pipetalk.quest-pipelines.com/~dba/login" target="_blank"&gt;http://pipetalk.quest-pipelines.com/~dba/login&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Try to give us some result from subquery or some example data ....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH &lt;BR /&gt;&lt;BR /&gt;Radim</description>
      <pubDate>Wed, 27 Aug 2003 17:36:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058017#M907995</guid>
      <dc:creator>Radim Jarosek</dc:creator>
      <dc:date>2003-08-27T17:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058018#M907996</link>
      <description>SELECT count(prod_code) &lt;BR /&gt;FROM tSi_Daily_Hist S &lt;BR /&gt;WHERE company_code = '0102' &lt;BR /&gt;AND NOT EXISTS &lt;BR /&gt;(SELECT prod_code &lt;BR /&gt;FROM tproduct P&lt;BR /&gt;where p.prod_code = s.prod_code); &lt;BR /&gt;&lt;BR /&gt;Because you are issing a not exists, you need to make sure you limit it correctly.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Wed, 27 Aug 2003 23:51:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058018#M907996</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2003-08-27T23:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: SQL</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058019#M907997</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;maybe the following notes on anti- and semi- joins can also help...&lt;BR /&gt;==============================================&lt;BR /&gt;A semi-join returns rows that match an EXISTS subquery, without duplicating rows from the left side of the predicate when multiple rows on the right side satisfy the criteria of the subquery. For example: &lt;BR /&gt;&lt;BR /&gt;SELECT * FROM dept &lt;BR /&gt;  WHERE EXISTS &lt;BR /&gt;    (SELECT * FROM emp &lt;BR /&gt;      WHERE dept.ename = emp.ename &lt;BR /&gt;        AND emp.bonus &amp;gt; 5000); &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;An anti-join returns rows from the left side of the predicate for which there is no corresponding row on the right side of the predicate. That is, it returns rows that fail to match (NOT IN) the subquery on the right side. For example, an anti-join can select a list of employees who are not in a particular set of departments: &lt;BR /&gt;&lt;BR /&gt;SELECT * FROM emp &lt;BR /&gt;  WHERE deptno NOT IN &lt;BR /&gt;    (SELECT deptno FROM dept &lt;BR /&gt;      WHERE loc = 'HEADQUARTERS'); &lt;BR /&gt;==============================================&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;best regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Thu, 28 Aug 2003 04:03:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058019#M907997</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-08-28T04:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058020#M907998</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think you have missed prod_code in the query.&lt;BR /&gt;&lt;BR /&gt;select count(S.prod_code) from tSi_Daily_Hist S WHERE company_code = '0102' AND S.prod_code NOT EXISTS ( select P.prod_code from tproduct P);&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;VJ.</description>
      <pubDate>Thu, 28 Aug 2003 10:01:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql/m-p/3058020#M907998</guid>
      <dc:creator>vasundhara</dc:creator>
      <dc:date>2003-08-28T10:01:43Z</dc:date>
    </item>
  </channel>
</rss>

