<?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 Combining Columns from Two Tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Combining-Columns-from-Two-Tables/m-p/1544627#M745010</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm relatively new to Qlikview and hoping someone can help me with a scripting issue I'm having. I have a table structured as follows though with a large number of records:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Role, ID&lt;BR /&gt;Manager, 1153&lt;BR /&gt;Employee, 1154&lt;BR /&gt;Employee, 1155&lt;BR /&gt;Employee, 1156&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I have another table that is structured as follows:&lt;/P&gt;&lt;P&gt;Table:2&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Org_CD, Org_Name&lt;BR /&gt;1, Org1&lt;BR /&gt;2, Org2&lt;BR /&gt;3, Org3&lt;BR /&gt;4, Org4&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I need to create a&amp;nbsp; table where every possible unique observation in the Org_Name column in table 2 is associated with each employee in table one where the role is manager. In other words, I need a separate row per Manager per Org_Name like the following:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Role&lt;/TD&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Org_Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone advise me on the best way to go about that in Qlikview? I haven't had much luck with the loop syntax as yet.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>PCullinan</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Combining Columns from Two Tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Columns-from-Two-Tables/m-p/1544627#M745010</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm relatively new to Qlikview and hoping someone can help me with a scripting issue I'm having. I have a table structured as follows though with a large number of records:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Role, ID&lt;BR /&gt;Manager, 1153&lt;BR /&gt;Employee, 1154&lt;BR /&gt;Employee, 1155&lt;BR /&gt;Employee, 1156&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I have another table that is structured as follows:&lt;/P&gt;&lt;P&gt;Table:2&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Org_CD, Org_Name&lt;BR /&gt;1, Org1&lt;BR /&gt;2, Org2&lt;BR /&gt;3, Org3&lt;BR /&gt;4, Org4&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I need to create a&amp;nbsp; table where every possible unique observation in the Org_Name column in table 2 is associated with each employee in table one where the role is manager. In other words, I need a separate row per Manager per Org_Name like the following:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Role&lt;/TD&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Org_Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;1153&lt;/TD&gt;&lt;TD&gt;Org4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone advise me on the best way to go about that in Qlikview? I haven't had much luck with the loop syntax as yet.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Columns-from-Two-Tables/m-p/1544627#M745010</guid>
      <dc:creator>PCullinan</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Columns from Two Tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Columns-from-Two-Tables/m-p/1544631#M745011</link>
      <description>You are looking for a full outer join, also known as join in Qlikview.&lt;BR /&gt;Try the following script.&lt;BR /&gt;&lt;BR /&gt;Table1:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Role, ID&lt;BR /&gt;Manager, 1153&lt;BR /&gt;Employee, 1154&lt;BR /&gt;Employee, 1155&lt;BR /&gt;Employee, 1156&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;JOIN (Table1)&lt;BR /&gt;LOAD Org_Name&lt;BR /&gt;INLINE [&lt;BR /&gt;Org_CD, Org_Name&lt;BR /&gt;1, Org1&lt;BR /&gt;2, Org2&lt;BR /&gt;3, Org3&lt;BR /&gt;4, Org4&lt;BR /&gt;];</description>
      <pubDate>Thu, 14 Feb 2019 23:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Columns-from-Two-Tables/m-p/1544631#M745011</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-02-14T23:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Columns from Two Tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Columns-from-Two-Tables/m-p/1544632#M745012</link>
      <description>&lt;P&gt;Wow, I can't believe I over complicated something so simple. Thanks for the quick response! I just needed to add a Where clause to restrict to only a single employee type. I'm posting my script below in case anyone else needs to see what the solution looked like using inline loads.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table1:&lt;BR /&gt;LOAD&lt;BR /&gt;Role,&lt;BR /&gt;ID&lt;BR /&gt;Where Role = 'Manager';&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Role, ID&lt;BR /&gt;Manager, 1153&lt;BR /&gt;Employee, 1154&lt;BR /&gt;Employee, 1155&lt;BR /&gt;Employee, 1156&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Join(Table1)&lt;/P&gt;&lt;P&gt;LOAD Org_Name&lt;BR /&gt;INLINE [&lt;BR /&gt;Org_CD, Org_Name&lt;BR /&gt;1, Org1&lt;BR /&gt;2, Org2&lt;BR /&gt;3, Org3&lt;BR /&gt;4, Org4&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 23:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Columns-from-Two-Tables/m-p/1544632#M745012</guid>
      <dc:creator>PCullinan</dc:creator>
      <dc:date>2019-02-14T23:21:23Z</dc:date>
    </item>
  </channel>
</rss>

