<?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 Detecting orphaned records in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155014#M31417</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;Many times we need to check two tables, associated by a key, to check for orphaned records. That situation SHOULD NOT OCCUR on the original database but, sometimes it happens.&lt;/P&gt;&lt;P&gt;An example ?&lt;/P&gt;&lt;P&gt;Say that you have a PRODUCTS COMPOSITION table, where you list all of the parts that will build up the product. Then you have another PARTS table, item per item.&lt;/P&gt;&lt;P&gt;So, an error could be a PRODUCT using an non existing part or a part that is not used in any product.&lt;/P&gt;&lt;P&gt;I'd like to list those problems or build a table only with those records. At the end of the script I will STORE that table into a TXT and send it via email to someone else reporting the problems.&lt;/P&gt;&lt;P&gt;As usual I have provided a very practical sample application.&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 May 2010 17:04:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-18T17:04:27Z</dc:date>
    <item>
      <title>Detecting orphaned records</title>
      <link>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155014#M31417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;Many times we need to check two tables, associated by a key, to check for orphaned records. That situation SHOULD NOT OCCUR on the original database but, sometimes it happens.&lt;/P&gt;&lt;P&gt;An example ?&lt;/P&gt;&lt;P&gt;Say that you have a PRODUCTS COMPOSITION table, where you list all of the parts that will build up the product. Then you have another PARTS table, item per item.&lt;/P&gt;&lt;P&gt;So, an error could be a PRODUCT using an non existing part or a part that is not used in any product.&lt;/P&gt;&lt;P&gt;I'd like to list those problems or build a table only with those records. At the end of the script I will STORE that table into a TXT and send it via email to someone else reporting the problems.&lt;/P&gt;&lt;P&gt;As usual I have provided a very practical sample application.&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 17:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155014#M31417</guid>
      <dc:creator />
      <dc:date>2010-05-18T17:04:27Z</dc:date>
    </item>
    <item>
      <title>Detecting orphaned records</title>
      <link>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155015#M31418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adriano,&lt;/P&gt;&lt;P&gt;Nice question.&lt;/P&gt;&lt;P&gt;This is some what similar to the Set analysis in Math.&lt;/P&gt;&lt;P&gt;Where we have 2 sets A &amp;amp; B, so you need the Union of (A - B) and (B - A)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will try to see if I can code the logic for the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 18:29:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155015#M31418</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-05-18T18:29:43Z</dc:date>
    </item>
    <item>
      <title>Detecting orphaned records</title>
      <link>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155016#M31419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Adriano , with the script right join the result is 59, is the value orphaned&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PART_CODE&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;Resident&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRODUCT&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;where&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;PART_CODE1 &amp;lt;&amp;gt; PART_CODE2; &lt;P&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;Drop&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;table&lt;/B&gt; &lt;P&gt;&lt;I&gt;PR&lt;/I&gt;&lt;I&gt;ODUCT;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 18:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155016#M31419</guid>
      <dc:creator />
      <dc:date>2010-05-18T18:37:51Z</dc:date>
    </item>
    <item>
      <title>Detecting orphaned records</title>
      <link>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155017#M31420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But we need to check (dump) PRODUCT B as well cause it points to a non existing PART (99)....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 19:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155017#M31420</guid>
      <dc:creator />
      <dc:date>2010-05-18T19:05:39Z</dc:date>
    </item>
    <item>
      <title>Detecting orphaned records</title>
      <link>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155018#M31421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this code creates a new table only with products without parts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;PRODUCT_WO_PARTS:&lt;BR /&gt;NOCONCATENATE LOAD * RESIDENT PRODUCT;&lt;BR /&gt;JOIN LOAD PART_CODE,PART_NAME RESIDENT PARTS;&lt;BR /&gt;RIGHT JOIN LOAD PRODUCT_NAME, PART_CODE RESIDENT PRODUCT_WO_PARTS&lt;BR /&gt;WHERE ISNULL(PART_NAME);&amp;lt;div&amp;gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I´ve used NOCONCATENATE because PRODUCT table is already in memory. If you read directly from QVD it´s not necessary.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 23:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Detecting-orphaned-records/m-p/155018#M31421</guid>
      <dc:creator>pablolabbe</dc:creator>
      <dc:date>2010-05-18T23:18:40Z</dc:date>
    </item>
  </channel>
</rss>

