<?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 merge tables in a QV script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200795#M59193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sooo sorry in my last reply I mixed up TableA and B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;must be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The number of rows can not be more than &lt;B&gt;table A&lt;/B&gt; contains.&lt;/LI&gt;&lt;LI&gt;All the data is in &lt;B&gt;Table A&lt;/B&gt;.&lt;/LI&gt;&lt;LI&gt;The number value (0001, 0002 etc) in row N should be the key for the rows (were the characters are in!) before that one.&lt;/LI&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I thought &lt;B&gt;Table&lt;/B&gt; &lt;B&gt;B&lt;/B&gt; could be helpfully so I created that one in order to have all keys gathered in the load order.&lt;/P&gt;&lt;P&gt;hope this explains it better...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Sep 2010 20:56:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-14T20:56:38Z</dc:date>
    <item>
      <title>merge tables in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200792#M59190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;Dear developers,&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;the following:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;assume I have 2 resident tables in my script&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;table A with 1 column, in this column 2 kinds of data appear like this:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;abcd&lt;/DIV&gt;&lt;DIV&gt;bcde&lt;/DIV&gt;&lt;DIV&gt;cdef&lt;/DIV&gt;&lt;DIV&gt;0001&lt;/DIV&gt;&lt;DIV&gt;defg&lt;/DIV&gt;&lt;DIV&gt;efgh&lt;/DIV&gt;&lt;DIV&gt;fghi&lt;/DIV&gt;&lt;DIV&gt;0002&lt;/DIV&gt;&lt;DIV&gt;etc.....&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;table B This one contains the numeric values of table A in 1 column as well&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;0001&lt;/DIV&gt;&lt;DIV&gt;0002&lt;/DIV&gt;&lt;DIV&gt;0003&lt;/DIV&gt;&lt;DIV&gt;0004&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;etc....&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The end result should be a table C with 2 columns like the one hereunder:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;0001 abcd&lt;/DIV&gt;&lt;DIV&gt;0001 bcde&lt;/DIV&gt;&lt;DIV&gt;0001 cdef&lt;/DIV&gt;&lt;DIV&gt;0002 defg&lt;/DIV&gt;&lt;DIV&gt;0002 efgh&lt;/DIV&gt;&lt;DIV&gt;0002 fghi&lt;/DIV&gt;&lt;DIV&gt;etc....&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;How can I have this result?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thx in advance...&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Felix&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:23:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200792#M59190</guid>
      <dc:creator />
      <dc:date>2010-09-14T17:23:30Z</dc:date>
    </item>
    <item>
      <title>merge tables in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200793#M59191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi felix,&lt;BR /&gt;so try:&lt;/P&gt;&lt;P&gt;TableC:&lt;BR /&gt;load columnB&lt;BR /&gt;resident tableB;&lt;/P&gt;&lt;P&gt;left join(TableC)&lt;BR /&gt;load columnA&lt;BR /&gt;resident tableA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:43:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200793#M59191</guid>
      <dc:creator />
      <dc:date>2010-09-14T17:43:05Z</dc:date>
    </item>
    <item>
      <title>merge tables in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200794#M59192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabio,&lt;/P&gt;&lt;P&gt;thx for your suggestion! 2 bad it didn't work out for me...I think I didn't explain the problem well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The number of rows can not be more than table B contains.&lt;/LI&gt;&lt;LI&gt;All the data is in Table B.&lt;/LI&gt;&lt;LI&gt;The number value (0001, 0002 etc) in row N should be the key for the rows (were the characters are in!) before that one.&lt;/LI&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I thought Table A could be helpfully so I created that one in order to have all keys gathered in the load order.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 20:42:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200794#M59192</guid>
      <dc:creator />
      <dc:date>2010-09-14T20:42:13Z</dc:date>
    </item>
    <item>
      <title>merge tables in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200795#M59193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sooo sorry in my last reply I mixed up TableA and B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;must be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The number of rows can not be more than &lt;B&gt;table A&lt;/B&gt; contains.&lt;/LI&gt;&lt;LI&gt;All the data is in &lt;B&gt;Table A&lt;/B&gt;.&lt;/LI&gt;&lt;LI&gt;The number value (0001, 0002 etc) in row N should be the key for the rows (were the characters are in!) before that one.&lt;/LI&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I thought &lt;B&gt;Table&lt;/B&gt; &lt;B&gt;B&lt;/B&gt; could be helpfully so I created that one in order to have all keys gathered in the load order.&lt;/P&gt;&lt;P&gt;hope this explains it better...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 20:56:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200795#M59193</guid>
      <dc:creator />
      <dc:date>2010-09-14T20:56:38Z</dc:date>
    </item>
    <item>
      <title>merge tables in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200796#M59194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's one way:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;A:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Field1&lt;BR /&gt;abcd&lt;BR /&gt;bcde&lt;BR /&gt;cdef&lt;BR /&gt;0001&lt;BR /&gt;defg&lt;BR /&gt;efgh&lt;BR /&gt;fghi&lt;BR /&gt;0002&lt;BR /&gt;];&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;B:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Field2&lt;BR /&gt;0001&lt;BR /&gt;0002&lt;BR /&gt;];&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;C:&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;LOAD&lt;BR /&gt; recno() as Sequence&lt;BR /&gt;,Field1&lt;BR /&gt;RESIDENT A&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (C)&lt;BR /&gt;LOAD&lt;BR /&gt; Sequence&lt;BR /&gt;,Field1&lt;BR /&gt;,if(exists(Field2,Field1),Field1,peek(Field2)) as Field2&lt;BR /&gt;RESIDENT C&lt;BR /&gt;ORDER BY Sequence DESC&lt;BR /&gt;;&lt;BR /&gt;INNER JOIN (C)&lt;BR /&gt;LOAD Sequence&lt;BR /&gt;RESIDENT C&lt;BR /&gt;WHERE Field1&amp;lt;&amp;gt;Field2&lt;BR /&gt;;&lt;BR /&gt;DROP FIELD&lt;BR /&gt; Sequence&lt;BR /&gt;;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;DROP TABLES&lt;BR /&gt; A&lt;BR /&gt;,B&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;But if the only reason you had table B was to make it easier to identify the numeric values and sequence in table A, then B is completely unnecessary, and it is simpler to go straight from A to C:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;A:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Field1&lt;BR /&gt;abcd&lt;BR /&gt;bcde&lt;BR /&gt;cdef&lt;BR /&gt;0001&lt;BR /&gt;defg&lt;BR /&gt;efgh&lt;BR /&gt;fghi&lt;BR /&gt;0002&lt;BR /&gt;];&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;C:&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;LOAD&lt;BR /&gt; recno() as Sequence&lt;BR /&gt;,Field1&lt;BR /&gt;RESIDENT A&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (C)&lt;BR /&gt;LOAD&lt;BR /&gt; Sequence&lt;BR /&gt;,Field1&lt;BR /&gt;,if(num(Field1),Field1,peek(Field2)) as Field2&lt;BR /&gt;RESIDENT C&lt;BR /&gt;ORDER BY Sequence DESC&lt;BR /&gt;;&lt;BR /&gt;INNER JOIN (C)&lt;BR /&gt;LOAD Sequence&lt;BR /&gt;RESIDENT C&lt;BR /&gt;WHERE Field1&amp;lt;&amp;gt;Field2&lt;BR /&gt;;&lt;BR /&gt;DROP FIELD Sequence;&lt;BR /&gt;DROP TABLE A;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 01:09:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/merge-tables-in-a-QV-script/m-p/200796#M59194</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-15T01:09:19Z</dc:date>
    </item>
  </channel>
</rss>

