<?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 equivalent in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947509#M971784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;File 1:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UIDs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABCD&lt;/P&gt;&lt;P&gt;EFGH&lt;/P&gt;&lt;P&gt;HIJK&lt;/P&gt;&lt;P&gt;JKLM&lt;/P&gt;&lt;P&gt;LMNO&lt;/P&gt;&lt;P&gt;OPQR&lt;/P&gt;&lt;P&gt;QRST&lt;/P&gt;&lt;P&gt;STUV&lt;/P&gt;&lt;P&gt;UVWX&lt;/P&gt;&lt;P&gt;WXYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;UIDREF1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABCD&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;UIDREF2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LMNO&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;EFGH&lt;/TD&gt;&lt;TD&gt;WXYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;HIJK&lt;/TD&gt;&lt;TD&gt;STUV&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LMNO&lt;/TD&gt;&lt;TD&gt;WXYZ&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement is that I shall pick each line from File 1, and search for all references in File 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result 1: ABCD -&amp;gt; LMNO -&amp;gt; WXYZ -&amp;gt; EFGH&lt;/P&gt;&lt;P&gt;Result 2: EFGH -&amp;gt; WXYZ -&amp;gt; LMNO -&amp;gt; ABCD&lt;/P&gt;&lt;P&gt;Result 3: HIJK -&amp;gt; STUV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Sep 2015 09:10:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-15T09:10:49Z</dc:date>
    <item>
      <title>SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947505#M971780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please give me equivalent of below SQL script ?&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; t1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;id&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;BR /&gt;&amp;nbsp; t1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;parent_id&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;BR /&gt;&amp;nbsp; t1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; t2&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;name &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;AS&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; parent_name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; t2&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;id &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;AS&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; parent_id&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; tbl t1&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;LEFT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; tbl t2 &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;ON&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; t2&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;id &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; t1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;parent_id&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;&amp;nbsp; START&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;WITH&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; t1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;id &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;&amp;nbsp; CONNECT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;BY&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; PRIOR t1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;id &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; t1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;parent_id&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;I found solution to one of my tasks ( see previous thread &lt;A href="https://community.qlik.com/message/864414"&gt;How to find References of table entries recursively ?&lt;/A&gt; for more details)&amp;nbsp; using SQL. But i would request your help in resolving to QlikView Script.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 15:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947505#M971780</guid>
      <dc:creator />
      <dc:date>2015-09-14T15:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947506#M971781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you try bring as sql?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *;&lt;/P&gt;&lt;P&gt;SQL SELECT....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then put all your sql&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 01:18:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947506#M971781</guid>
      <dc:creator>fkeuroglian</dc:creator>
      <dc:date>2015-09-15T01:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947507#M971782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;//** this emulates some hierarchy data&lt;BR /&gt;[SOURCE]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;* &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; parent_id id name&lt;BR /&gt; 0 1 Level1&lt;BR /&gt; 1 2 Level2&lt;BR /&gt; 2 3 Level3&lt;BR /&gt; 1 2.5 Level2.5&lt;BR /&gt; 3 4 Level4&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ' ');&lt;BR /&gt; &lt;BR /&gt; [t1]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NOCONCATENATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;parent_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [SOURCE];&lt;BR /&gt; &lt;BR /&gt; [HIERARCHY]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Hierarchy&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;parent_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,hierarchy,'\',depth)&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [t1];&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [t1],[SOURCE]; &lt;BR /&gt;&lt;IMG __jive_id="98923" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/98923_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 02:18:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947507#M971782</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2015-09-15T02:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947508#M971783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt;Can you attach the sample data for two tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 02:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947508#M971783</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-09-15T02:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947509#M971784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;File 1:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UIDs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABCD&lt;/P&gt;&lt;P&gt;EFGH&lt;/P&gt;&lt;P&gt;HIJK&lt;/P&gt;&lt;P&gt;JKLM&lt;/P&gt;&lt;P&gt;LMNO&lt;/P&gt;&lt;P&gt;OPQR&lt;/P&gt;&lt;P&gt;QRST&lt;/P&gt;&lt;P&gt;STUV&lt;/P&gt;&lt;P&gt;UVWX&lt;/P&gt;&lt;P&gt;WXYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;UIDREF1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABCD&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;UIDREF2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LMNO&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;EFGH&lt;/TD&gt;&lt;TD&gt;WXYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;HIJK&lt;/TD&gt;&lt;TD&gt;STUV&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LMNO&lt;/TD&gt;&lt;TD&gt;WXYZ&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement is that I shall pick each line from File 1, and search for all references in File 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result 1: ABCD -&amp;gt; LMNO -&amp;gt; WXYZ -&amp;gt; EFGH&lt;/P&gt;&lt;P&gt;Result 2: EFGH -&amp;gt; WXYZ -&amp;gt; LMNO -&amp;gt; ABCD&lt;/P&gt;&lt;P&gt;Result 3: HIJK -&amp;gt; STUV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 09:10:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947509#M971784</guid>
      <dc:creator />
      <dc:date>2015-09-15T09:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947510#M971785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Evan,&lt;/P&gt;&lt;P&gt;I am new to QlikView, hence not able to comprehend to my data. I have attached File 1 and File 2&amp;nbsp; data below, Please let me know how can i achieve the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;File 1:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;UIDs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ABCD&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;EFGH&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;HIJK&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;JKLM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LMNO&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;OPQR&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;QRST&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STUV&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;UVWX&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WXYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;File 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE style="border: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;UIDREF1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;ABCD&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;UIDREF2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;LMNO&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;EFGH&lt;/TD&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;WXYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;HIJK&lt;/TD&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;STUV&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;LMNO&lt;/TD&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;WXYZ&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected Output :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Result 1: ABCD -&amp;gt; LMNO -&amp;gt; WXYZ -&amp;gt; EFGH&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Result 2: EFGH -&amp;gt; WXYZ -&amp;gt; LMNO -&amp;gt; ABCD&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Result 3: HIJK -&amp;gt; STUV&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;. so on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 09:32:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947510#M971785</guid>
      <dc:creator />
      <dc:date>2015-09-15T09:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947511#M971786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following will reproduce the results you seek.&amp;nbsp; But really what I was after was something that really captured following the efficiencies of the associations.&amp;nbsp; &lt;EM&gt;When you flip the sides of a table and join it back in on itself, is that still technically recursive?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="99054" alt="ellipticals.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99054_ellipticals.png" style="width: 620px; height: 287px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;[t1]:&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[&lt;BR /&gt;&lt;BR /&gt;Parent,Child&lt;BR /&gt;&lt;BR /&gt;ABCD,ABCD&lt;BR /&gt;&lt;BR /&gt;ABCD,LMNO&lt;BR /&gt;&lt;BR /&gt;LMNO,WXYZ&lt;BR /&gt;&lt;BR /&gt;EFGH,EFGH&lt;BR /&gt;&lt;BR /&gt;EFGH,WXYZ&lt;BR /&gt;&lt;BR /&gt;HIJK,HIJK&lt;BR /&gt;&lt;BR /&gt;HIJK,STUV&lt;BR /&gt;&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;delimiter&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ',');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[HIERARCHY]:&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,hierarchy,'\',depth)&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [t1];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;//** For your second pass it looks&lt;BR /&gt;like you flipped the sides of the table on itself &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;//** and worked your way back down&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;BR /&gt;[temp2]:&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;NOCONCATENATE&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child2&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level2&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[&lt;BR /&gt;&lt;BR /&gt;Child2,Parent2&lt;BR /&gt;&lt;BR /&gt;ABCD,LMNO&lt;BR /&gt;&lt;BR /&gt;LMNO,WXYZ&lt;BR /&gt;&lt;BR /&gt;EFGH,WXYZ&lt;BR /&gt;&lt;BR /&gt;WXYZ,WXYZ&lt;BR /&gt;&lt;BR /&gt;HIJK,STUV&lt;BR /&gt;&lt;BR /&gt;STUV,STUV&lt;BR /&gt;&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;delimiter&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ',');&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;[H2]:&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,hierarchy,'\',depth)&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [temp2]; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;qualify&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;*;&lt;BR /&gt;&lt;BR /&gt;[H3]:&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;NOCONCATENATE&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [H2];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;UNQUALIFY&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; *;&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;LEFT&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(HIERARCHY)&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;H3.Level21&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;H3.hierarchy&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [H3];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [H3]; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;BR /&gt;[t1],[temp2],[H2]; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[h4]:&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;NOCONCATENATE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;MaxString&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Final&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;F2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;GROUP&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;BY&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Attach&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Final&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Right&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',1))) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Attach&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',1) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',2) &amp;amp; ':'&lt;BR /&gt;&amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',-1) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',-2) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Flip&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; HIERARCHY&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;LEN&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&amp;gt;0&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;NOT&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',1) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Part2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',2) = &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',-1) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',-2)&lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [HIERARCHY];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 19:49:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947511#M971786</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2015-09-15T19:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947512#M971787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Also...&amp;nbsp; another result, but this time no extra rows inserted into base table&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[t1]:&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[&lt;BR /&gt;&lt;BR /&gt;Parent,Child&lt;BR /&gt;&lt;BR /&gt;ABCD,LMNO&lt;BR /&gt;&lt;BR /&gt;LMNO,WXYZ&lt;BR /&gt;&lt;BR /&gt;EFGH,WXYZ&lt;BR /&gt;&lt;BR /&gt;HIJK,STUV&lt;BR /&gt;&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;delimiter&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ',');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[MAP_PARENTS]:&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;MAPPING&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, 0 &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [t1];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;CONCATENATE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(t1)&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [t1]&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;WHERE&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;NOT&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;('MAP_PARENTS',&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) = 0;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[HIERARCHY]:&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,hierarchy,'\',depth)&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [t1];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[H2]:&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Right&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,4) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[NewField_1]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;MaxString&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [HIERARCHY]&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;GROUP&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;BY&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Level1&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [HIERARCHY];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;FOR&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp; = 1 &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; 5&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;j&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; + 1&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;LEFT&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(H2)&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[NewField_$(i)]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Child&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Null&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(),&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Parent&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[NewField_$(j)]&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [t1];&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;NEXT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[FINAL]:&lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;NOCONCATENATE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;MaxString&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;FINAL&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;FINAL&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;GROUP&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;BY&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;FINAL&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'\',1);&lt;BR /&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;BR /&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &amp;amp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)=0 &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&amp;gt;0, '\' &amp;amp;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ) &amp;amp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_3&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)=0 &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_3&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&amp;gt;0, '\' &amp;amp;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_3&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ) &amp;amp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_4&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)=0 &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_4&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&amp;gt;0, '\' &amp;amp;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_4&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ) &amp;amp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_5&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)=0 &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_5&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&amp;gt;0, '\' &amp;amp;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_5&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ) &amp;amp; &lt;BR /&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hierarchy&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_6&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)=0 &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_6&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&amp;gt;0, '\' &amp;amp;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;NewField_6&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; ) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;FINAL&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; [H2];&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 20:41:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947512#M971787</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2015-09-15T20:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947513#M971788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Evan,&lt;/P&gt;&lt;P&gt;This almost provided me with results i am looking for. But some how it is missing one line item here. Please see below.&lt;IMG alt="Missing.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99116_Missing.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;1. For some strange reason, i dont see results of LMNO. &lt;/P&gt;&lt;P&gt;2. Also I got few open queries . I have file 1 from where i pick up each entry and have to look in File 2 starting from column 1 in file 2. Kindly let me know how that can be done.&lt;/P&gt;&lt;P&gt;3. Your script is using the number of lines present in the input file (&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;FOR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp; = 1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; 5&lt;/SPAN&gt;). How can i use this for my scenario, where File 1 is having 120 million records and File 2 is have 3.5 Billion Records (spread across two columns).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S: I know i am getting all done from you, but believe me I have done this using C code, but not finding useful. Also i am too far from QlikTech.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 10:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947513#M971788</guid>
      <dc:creator />
      <dc:date>2015-09-16T10:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947514#M971789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on the 3 result rows you outlined and isolated from the larger list of possible sub-chains, here's how I interpreted the "rules" of your data:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The only result rows you are seeking are the longest chains of association per absolute parent.&amp;nbsp; A valid chain cannot include any given node twice.&amp;nbsp; A chain built from parent &amp;amp; child LMNO would have produced LMNO/WXYZ/EFGH, but this is a subset of your Result 1 chain: ABCD/&lt;EM&gt;LMNO/WXYZ/EFGH.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that any result row that begins with a node that is also a child is omitted from the result set.&amp;nbsp; Otherwise you would need to modify your own results example with a Result 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result 1: ABCD/LMNO/WXYZ/EFGH&lt;/P&gt;&lt;P&gt;Result 4: LMNO/WXYZ/EFGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want all the sub-node combinations back in there, just start lopping off the WHERE clause filters where I'm trimming the result set down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 2&lt;/STRONG&gt;:&amp;nbsp; The best way to work with multiple files is to use the File Wizard.&amp;nbsp;&amp;nbsp; Treat each separate file as you would a database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 3&lt;/STRONG&gt;:&amp;nbsp;&amp;nbsp; The &lt;EM&gt;i&lt;/EM&gt; loop iteration just needs to perform as many re-joins of the table to itself as many times as there is depth to the hierarchy &lt;EM&gt;(similar to if you broke open the hierarchy command and applied it in the individual steps). &lt;/EM&gt; You could probably assign &lt;EM&gt;i&lt;/EM&gt; to the [depth] field generated by the hierarchy() statement on the way in, as when you flip the table and go back down, I think the maximum depth has to be the same coming &amp;amp; going&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rowcounts wouldn't matter, what would matter is how many nodes are stacked onto your longest chain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly though.. whether this can be done easily in C, or SQL, or I'm sure there's a leaner solution in QlikView, it still seems like the data formats are... convoluted.&amp;nbsp; Without seeing the applicability to a real-life usage, having a hard time visualizing why you'd want to complicate things by having the node chains double-back on themselves, vs. just laying them all out in a straight line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 03:23:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947514#M971789</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2015-09-17T03:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947515#M971790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Evan for your all help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am consolidating a site which has data in Oracle tables. all the data that i listed in file 2 are related internally. So if i move one line item from site 1 to site 2 , i had to take all related object links. Hence that requirement. &lt;/P&gt;&lt;P&gt;I thought QlikView handles such cases internally or does in an efficient manner. But it also needs lots of manipulation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 11:55:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947515#M971790</guid>
      <dc:creator />
      <dc:date>2015-09-18T11:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: SQL equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947516#M971791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on this latest description, all you need to do is this simple one liner, and you're done.&amp;nbsp; Miller time.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;BR /&gt;Hierarchy &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;parent_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,hierarchy,'\',depth)&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [t1];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Sep 2015 00:17:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-equivalent/m-p/947516#M971791</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2015-09-19T00:17:29Z</dc:date>
    </item>
  </channel>
</rss>

