<?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: Remapping parent fields to child in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Remapping-parent-fields-to-child/m-p/44623#M7490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Solve it directly in QlikView or Qlik Sense by using the Hierarchy load prefix:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The syntax:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes/Hierarchy.htm" title="https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes/Hierarchy.htm"&gt;https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes/Hierarchy.htm&lt;/A&gt;‌‌ &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Excellent articles by Qlik's own master Henric Cronström:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-5334"&gt;Hierarchies&lt;/A&gt;‌&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3433"&gt;Unbalanced, n-level hierarchies&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Alternatively solve it with the source database's own syntax in the SQL statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;This is a such a common challenge so all the larger SQL database vendors have provided a special syntax to solve this. Here is the general information about the topic: &lt;A href="https://en.wikipedia.org/wiki/Hierarchical_and_recursive_queries_in_SQL" title="https://en.wikipedia.org/wiki/Hierarchical_and_recursive_queries_in_SQL"&gt;Hierarchical and recursive queries in SQL - Wikipedia&lt;/A&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Oracle DB has the CONNECT BY: &lt;A href="http://www.dba-oracle.com/t_connect_by.htm" title="http://www.dba-oracle.com/t_connect_by.htm"&gt;Oracle "connect by" syntax&lt;/A&gt;‌ or the WITH (CTE) statement: &lt;A href="https://www.morganslibrary.org/reference/with.html" title="https://www.morganslibrary.org/reference/with.html"&gt;Oracle 12c Common Table Expressions&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;IBM DB2: &lt;A href="https://www.ibm.com/developerworks/ibmi/library/i-db2connectby/index.html" title="https://www.ibm.com/developerworks/ibmi/library/i-db2connectby/index.html"&gt;Hierarchical Queries with DB2 Connect By&lt;/A&gt;‌&amp;nbsp; and &lt;A href="https://www.toadworld.com/platforms/ibmdb2/w/wiki/7708.hierarchical-queries" title="https://www.toadworld.com/platforms/ibmdb2/w/wiki/7708.hierarchical-queries"&gt;Hierarchical Queries - IBM DB2 Wiki - IBM DB2 - Toad World&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Microsoft SQL Server: &lt;A href="https://technet.microsoft.com/en-us/library/ms186243(v=sql.105).aspx" title="https://technet.microsoft.com/en-us/library/ms186243(v=sql.105).aspx"&gt;Recursive Queries Using Common Table Expressions&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;PostgreSQL: &lt;A href="https://www.postgresql.org/docs/current/static/queries-with.html" title="https://www.postgresql.org/docs/current/static/queries-with.html"&gt;https://www.postgresql.org/docs/current/static/queries-with.html&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;MySQL: &lt;A href="http://www.mysqltutorial.org/mysql-cte/" title="http://www.mysqltutorial.org/mysql-cte/"&gt;An Introduction to MySQL CTE&lt;/A&gt;‌&lt;/LI&gt;&lt;LI&gt;Good article about the topic: &lt;A href="https://www.linkedin.com/pulse/step-by-step-guide-creating-sql-hierarchical-queries-bibhas-mitra/" title="https://www.linkedin.com/pulse/step-by-step-guide-creating-sql-hierarchical-queries-bibhas-mitra/"&gt;https://www.linkedin.com/pulse/step-by-step-guide-creating-sql-hierarchical-queries-bibhas-mitra/&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Feb 2018 08:55:25 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2018-02-19T08:55:25Z</dc:date>
    <item>
      <title>Remapping parent fields to child</title>
      <link>https://community.qlik.com/t5/QlikView/Remapping-parent-fields-to-child/m-p/44622#M7489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a set of data that contains a "Parent" reference, that links back to the same table but a different record:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Customer:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;code,&lt;/P&gt;
&lt;P&gt;name,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oid AS myCustomer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; isChildAccount,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(myParent=0,'',myParent) AS myParent;&lt;/P&gt;
&lt;P&gt;SQL SELECT &lt;/P&gt;
&lt;P&gt;code,&lt;/P&gt;
&lt;P&gt;name,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oid,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; isChildAccount,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myParent&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;FROM LoginSchema.Customer;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (Customer)&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;getCustomer AS myCustomer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getJCJob AS myJCJob,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myAssociatedJob,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myHousingCRMOrganisation,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getCRMOrganisation,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oid AS myHousingCustomer;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;SQL SELECT &lt;/P&gt;
&lt;P&gt;getCustomer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getJCJob,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myAssociatedJob,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myHousingCRMOrganisation,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getCRMOrganisation,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oid&lt;/P&gt;
&lt;P&gt;FROM LoginSchema.HousingCustomer;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wanting to populate everything from the parent record against the child record, but can't get my head around how to have the records loop back on themselves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2018 04:36:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remapping-parent-fields-to-child/m-p/44622#M7489</guid>
      <dc:creator>lukegilligan</dc:creator>
      <dc:date>2018-02-19T04:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remapping parent fields to child</title>
      <link>https://community.qlik.com/t5/QlikView/Remapping-parent-fields-to-child/m-p/44623#M7490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Solve it directly in QlikView or Qlik Sense by using the Hierarchy load prefix:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The syntax:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes/Hierarchy.htm" title="https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes/Hierarchy.htm"&gt;https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes/Hierarchy.htm&lt;/A&gt;‌‌ &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Excellent articles by Qlik's own master Henric Cronström:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-5334"&gt;Hierarchies&lt;/A&gt;‌&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3433"&gt;Unbalanced, n-level hierarchies&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Alternatively solve it with the source database's own syntax in the SQL statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;This is a such a common challenge so all the larger SQL database vendors have provided a special syntax to solve this. Here is the general information about the topic: &lt;A href="https://en.wikipedia.org/wiki/Hierarchical_and_recursive_queries_in_SQL" title="https://en.wikipedia.org/wiki/Hierarchical_and_recursive_queries_in_SQL"&gt;Hierarchical and recursive queries in SQL - Wikipedia&lt;/A&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Oracle DB has the CONNECT BY: &lt;A href="http://www.dba-oracle.com/t_connect_by.htm" title="http://www.dba-oracle.com/t_connect_by.htm"&gt;Oracle "connect by" syntax&lt;/A&gt;‌ or the WITH (CTE) statement: &lt;A href="https://www.morganslibrary.org/reference/with.html" title="https://www.morganslibrary.org/reference/with.html"&gt;Oracle 12c Common Table Expressions&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;IBM DB2: &lt;A href="https://www.ibm.com/developerworks/ibmi/library/i-db2connectby/index.html" title="https://www.ibm.com/developerworks/ibmi/library/i-db2connectby/index.html"&gt;Hierarchical Queries with DB2 Connect By&lt;/A&gt;‌&amp;nbsp; and &lt;A href="https://www.toadworld.com/platforms/ibmdb2/w/wiki/7708.hierarchical-queries" title="https://www.toadworld.com/platforms/ibmdb2/w/wiki/7708.hierarchical-queries"&gt;Hierarchical Queries - IBM DB2 Wiki - IBM DB2 - Toad World&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Microsoft SQL Server: &lt;A href="https://technet.microsoft.com/en-us/library/ms186243(v=sql.105).aspx" title="https://technet.microsoft.com/en-us/library/ms186243(v=sql.105).aspx"&gt;Recursive Queries Using Common Table Expressions&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;PostgreSQL: &lt;A href="https://www.postgresql.org/docs/current/static/queries-with.html" title="https://www.postgresql.org/docs/current/static/queries-with.html"&gt;https://www.postgresql.org/docs/current/static/queries-with.html&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;MySQL: &lt;A href="http://www.mysqltutorial.org/mysql-cte/" title="http://www.mysqltutorial.org/mysql-cte/"&gt;An Introduction to MySQL CTE&lt;/A&gt;‌&lt;/LI&gt;&lt;LI&gt;Good article about the topic: &lt;A href="https://www.linkedin.com/pulse/step-by-step-guide-creating-sql-hierarchical-queries-bibhas-mitra/" title="https://www.linkedin.com/pulse/step-by-step-guide-creating-sql-hierarchical-queries-bibhas-mitra/"&gt;https://www.linkedin.com/pulse/step-by-step-guide-creating-sql-hierarchical-queries-bibhas-mitra/&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2018 08:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remapping-parent-fields-to-child/m-p/44623#M7490</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-02-19T08:55:25Z</dc:date>
    </item>
  </channel>
</rss>

