<?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: MergeMultiple rows into columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096399#M364235</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yet another example of a generic load. This is from one of my live applications, with a little unneeded complexity removed, hopefully without breaking it. Same idea as &lt;A href="https://community.qlik.com/qlik-users/4118"&gt;Colin_Albert&lt;/A&gt;‌'s link to &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;'s generic load, where the columns are all combined into one table instead of left as separate tables, just a slightly different approach to building that final table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// Creates one Generic.* table per Facility Event LCID/Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Generic]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GENERIC &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; [Order Item]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Facility Event LCID/Class]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Manufacturing Result]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM ManufacturingInstructions.qvd (QVD)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// Build new flat table with distinct order items.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// This is faster than a load distinct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Flat]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD text(fieldvalue('Order Item',recno())) as [Order Item]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Order Item')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// For each table that still exists&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET i = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DO WHILE i &amp;lt; nooftables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTable = tablename($(i));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If it's one of our Generic.* tables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF&amp;nbsp; subfield(vTable,'.',1)='Generic' THEN &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add the field to our flat table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT JOIN ([Flat])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [$(vTable)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ORDER BY [Order Item]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // And delete the Generic.* table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE [$(vTable)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Not a Generic.* table. Skip past it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET i = i + 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOOP &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Feb 2016 17:15:29 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2016-02-23T17:15:29Z</dc:date>
    <item>
      <title>MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096393#M364229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have below table&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 195px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;" width="101"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Desc&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="94"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Val&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Errors&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Category&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Loan&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;Sub Category &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Loan Sold&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Label&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;Record Count&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Need to separate and make it show like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Errors&amp;nbsp;&amp;nbsp; Category&amp;nbsp;&amp;nbsp; Sub Category&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loan&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loan Sold&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Record Count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me how to do this.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Venkata&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:27:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096393#M364229</guid>
      <dc:creator>venkatg6759</dc:creator>
      <dc:date>2016-02-23T16:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096394#M364230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Generic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD 1 as Field,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desc, Val&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Errors, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Category, Loan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sub Category, Loan Sold&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Label, Record Count&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Field Field;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/115661_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096394#M364230</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-23T16:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096395#M364231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your table &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A source (excel, sql, etc)&lt;/LI&gt;&lt;LI&gt;An object?&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096395#M364231</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-02-23T16:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096396#M364232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not excel.It's coming from SQL.these are just 2 columns in that table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096396#M364232</guid>
      <dc:creator>venkatg6759</dc:creator>
      <dc:date>2016-02-23T16:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096397#M364233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;What is the DB you are using like Oracle, MySQL etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Sreeman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:59:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096397#M364233</guid>
      <dc:creator />
      <dc:date>2016-02-23T16:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096398#M364234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generic Load can fix your data as suggested by Sunny T &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post has more details &lt;A href="https://community.qlik.com/qlik-blogpost/3629"&gt;The Generic Load&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 17:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096398#M364234</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-02-23T17:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096399#M364235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yet another example of a generic load. This is from one of my live applications, with a little unneeded complexity removed, hopefully without breaking it. Same idea as &lt;A href="https://community.qlik.com/qlik-users/4118"&gt;Colin_Albert&lt;/A&gt;‌'s link to &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;'s generic load, where the columns are all combined into one table instead of left as separate tables, just a slightly different approach to building that final table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// Creates one Generic.* table per Facility Event LCID/Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Generic]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GENERIC &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; [Order Item]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Facility Event LCID/Class]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Manufacturing Result]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM ManufacturingInstructions.qvd (QVD)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// Build new flat table with distinct order items.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// This is faster than a load distinct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Flat]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD text(fieldvalue('Order Item',recno())) as [Order Item]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Order Item')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// For each table that still exists&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET i = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DO WHILE i &amp;lt; nooftables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTable = tablename($(i));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If it's one of our Generic.* tables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF&amp;nbsp; subfield(vTable,'.',1)='Generic' THEN &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add the field to our flat table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT JOIN ([Flat])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [$(vTable)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ORDER BY [Order Item]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // And delete the Generic.* table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE [$(vTable)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Not a Generic.* table. Skip past it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET i = i + 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOOP &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 17:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096399#M364235</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-02-23T17:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096400#M364236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will try this .But Generic Load worked for me .Later I merged column tables to main table by join.Thank you John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 21:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096400#M364236</guid>
      <dc:creator>venkatg6759</dc:creator>
      <dc:date>2016-02-23T21:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096401#M364237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was helpful colin .Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 21:49:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096401#M364237</guid>
      <dc:creator>venkatg6759</dc:creator>
      <dc:date>2016-02-23T21:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096402#M364238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the generic load serves your needs, you're done. I wouldn't introduce complicated scripting like I show above to combine the fields into one table. I needed it so that I could store the result as a QVD. If you don't have that or another compelling reason to combine the fields, just leave them like the generic load builds them. I really should have mentioned that in my original post, but I wasn't thinking it through, just grabbing an example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 21:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096402#M364238</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-02-23T21:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: MergeMultiple rows into columns</title>
      <link>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096403#M364239</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;another version of a script to recombine tables generated by a generic load into one can be found here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/2010/05/use-cases-for-generic-load/" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;Use cases for Generic Load | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;by &lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="2286" data-objecttype="3" href="https://community.qlik.com/people/rwunderlich" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;Rob Wunderlich&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 22:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MergeMultiple-rows-into-columns/m-p/1096403#M364239</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-02-23T22:34:11Z</dc:date>
    </item>
  </channel>
</rss>

