<?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>Question Re: Table data comparison in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839442#M4870285</link>
    <description>&lt;P&gt;I think I got it.  Difference being the handling of NULL.  Much appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2011 11:34:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-18T11:34:45Z</dc:date>
    <item>
      <title>Table data comparison</title>
      <link>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaq-p/13839438</link>
      <description>&lt;P&gt;When comparing data (fields) between two tables is there an advantage to using EXCEPT, INTERSECT, or, in the case of looking for data in ONE field between two tables, can a JOIN of the two tables accomplish the same thing?&lt;/P&gt;
&lt;P&gt;ex: 
//join two tables and look for matching fields: 
select t.FIELD, t2.FIELD
from tableone t
join tabletwo t
where t.FIELD = t2.FIELD &lt;/P&gt;
&lt;P&gt;ex2:
//two tables comparing the same two fields using intersect: &lt;/P&gt;
&lt;P&gt;ex3: 
//two tables comparing the same two fields using except: &lt;/P&gt;
&lt;P&gt;Appreciate any help provided. &lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2011 09:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaq-p/13839438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-18T09:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table data comparison</title>
      <link>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839439#M4870282</link>
      <description>&lt;P&gt;The answer will depend on what the question is - are you looking for rows that are the same, rows that are different, or both?&lt;/P&gt;
&lt;P&gt;See the answers in this &lt;A href="http://sqlanywhere-forum.sap.com/questions/4964/how-to-compare-two-nearly-identical-tables-and-list-the-differencing-rows"&gt;thread&lt;/A&gt; that can get you started. &lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2011 10:14:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839439#M4870282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-18T10:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table data comparison</title>
      <link>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839441#M4870284</link>
      <description>&lt;P&gt;I'll try to clarify.  If you are looking in two tables to see if data in one field is the same in both tables is there a benefit to using a join or INTERSECT/EXCEPT.  This could be if the fields are the same, different or both.  Generally speaking.  Will a join provide the same results as INTERSECT/EXCEPT?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2011 11:07:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839441#M4870284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-18T11:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Table data comparison</title>
      <link>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839440#M4870283</link>
      <description>&lt;P&gt;A join, by definition, will produce a result set with &lt;STRONG&gt;matches&lt;/STRONG&gt;. EXCEPT will produce a result set containing &lt;STRONG&gt;differences&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;INTERSECT is roughly equivalent to inner join except that:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;INTERSECT handles NULL values quite differently than join does, and&lt;/LI&gt;
&lt;LI&gt;the number of rows you get in the result won't match the join either, in general. &lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 18 Apr 2011 11:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839440#M4870283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-18T11:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Table data comparison</title>
      <link>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839442#M4870285</link>
      <description>&lt;P&gt;I think I got it.  Difference being the handling of NULL.  Much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2011 11:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839442#M4870285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-18T11:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Table data comparison</title>
      <link>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839443#M4870286</link>
      <description>&lt;P&gt;That being said, an OUTER JOIN can also be used to produce a difference, as long as you just select those rows that have no match (or differ in other ways), say&lt;/P&gt;
&lt;P&gt;select T1.pk, T2.pk
   from T1 full outer join T2 on T1.pk = T2.pk
   where T1.pk is null or T2.pk is null&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;(However, IMHO, EXCEPT would be much more comprehensible here.)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2011 11:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-data-comparison/qaa-p/13839443#M4870286</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2011-04-18T11:49:58Z</dc:date>
    </item>
  </channel>
</rss>

