<?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 Concating Load with Differing Field Names in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Concating-Load-with-Differing-Field-Names/m-p/117861#M18145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a number of (thousands) files to load into a master table.&lt;/P&gt;&lt;P&gt;These files are very similar in nature, though can have differing field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File1:&lt;/P&gt;&lt;P&gt;field_a, field_b, field_b1, field_b2, field_c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File2:&lt;/P&gt;&lt;P&gt;field_a, field_b, field_b1, field_b2, field_b3, field_d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;My intent is to have one table with all possible fields - concatenating the same fields, joining any new ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming a left join would be in order?&amp;nbsp;&amp;nbsp; Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each file in filelist('lib://mylib\*.csv')&lt;/P&gt;&lt;P&gt;MasterTable:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;From [$(file)];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join(MasterTable)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;From[$(file)];&lt;/P&gt;&lt;P&gt;Next file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would work for the 2nd (and subsequent) files, but obviously not the first.&lt;/P&gt;&lt;P&gt;Is there&amp;nbsp; an autogenerate or counter that I could employ maybe?&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2018 17:49:52 GMT</pubDate>
    <dc:creator>joey_lutes</dc:creator>
    <dc:date>2018-09-11T17:49:52Z</dc:date>
    <item>
      <title>Concating Load with Differing Field Names</title>
      <link>https://community.qlik.com/t5/QlikView/Concating-Load-with-Differing-Field-Names/m-p/117861#M18145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a number of (thousands) files to load into a master table.&lt;/P&gt;&lt;P&gt;These files are very similar in nature, though can have differing field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File1:&lt;/P&gt;&lt;P&gt;field_a, field_b, field_b1, field_b2, field_c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File2:&lt;/P&gt;&lt;P&gt;field_a, field_b, field_b1, field_b2, field_b3, field_d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;My intent is to have one table with all possible fields - concatenating the same fields, joining any new ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming a left join would be in order?&amp;nbsp;&amp;nbsp; Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each file in filelist('lib://mylib\*.csv')&lt;/P&gt;&lt;P&gt;MasterTable:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;From [$(file)];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join(MasterTable)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;From[$(file)];&lt;/P&gt;&lt;P&gt;Next file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would work for the 2nd (and subsequent) files, but obviously not the first.&lt;/P&gt;&lt;P&gt;Is there&amp;nbsp; an autogenerate or counter that I could employ maybe?&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2018 17:49:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concating-Load-with-Differing-Field-Names/m-p/117861#M18145</guid>
      <dc:creator>joey_lutes</dc:creator>
      <dc:date>2018-09-11T17:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Concating Load with Differing Field Names</title>
      <link>https://community.qlik.com/t5/QlikView/Concating-Load-with-Differing-Field-Names/m-p/117862#M18146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;you would need to see if in your table 1 the data matches your table2 so you can add a left join.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;since table 2 will be joined with table 1 and if the data in table 2 do not match those in table 1, your data will be shown as null if the data does not coincide and otherwise the data will show the data that coincide.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Table 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load * from tab1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;left join (Table 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load * from tab2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I think it would be more correct to concatenate something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Table 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load * from tab1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Concatenate (Table 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load * from tab2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I hope this clarifies your doubt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2018 18:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concating-Load-with-Differing-Field-Names/m-p/117862#M18146</guid>
      <dc:creator>GartoJsar</dc:creator>
      <dc:date>2018-09-11T18:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Concating Load with Differing Field Names</title>
      <link>https://community.qlik.com/t5/QlikView/Concating-Load-with-Differing-Field-Names/m-p/117863#M18147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you want Join. You want Concatenate, which appends rows to the an existing table. &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;Concatenate (MasterTable)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From[$(file)];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2018 19:02:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concating-Load-with-Differing-Field-Names/m-p/117863#M18147</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2018-09-11T19:02:01Z</dc:date>
    </item>
  </channel>
</rss>

