<?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 Left Join Multiple Files TXT in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517545#M437130</link>
    <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Hello, I would like to request help from you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I have several TXT files and would like to open a table by downloading all the columns and once they have been replicated in a new column where the key is the name of the file.&lt;/SPAN&gt; &lt;SPAN class=""&gt;I need to get the due date for each file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;If I do a left join, it works, but it will have two tables and I want to consolidate all the content into just one table.&lt;/SPAN&gt; &lt;SPAN class=""&gt;When I use only LOAD, it brings information only from the first file it finds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Can someone help me?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;[PRELOAD1]:
LOAD
FileBaseName() as PK_FileBaseName,
[A],
[B],
[C]
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, embedded labels, delimiter is '#', msq, header is 5 lines)
;

/////////////////////////////////////////////////////////////////////////////////////////////

[PRELOAD2]:
LOAD DISTINCT 
FileBaseName() as PK_FileBaseName,
date_pay,
date_shipping
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)
;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I tried to use something described below in the PRELOAD2 table, but the result allowed the same.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;vPath = 'lib://AMIL/';
For each File in FileList('$(vPath)/DM*.txt')

Left join 

[PRELOAD2]:
LOAD DISTINCT &lt;BR /&gt;FileBaseName() as PK_FileBaseName, &lt;BR /&gt;date_pay, &lt;BR /&gt;date_shipping&lt;BR /&gt;FROM $(File)&lt;BR /&gt;(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)&lt;BR /&gt;Where WildMatch([@3],'Emissão*') &lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Next File;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="text-wrap tlid-copy-target"&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Expected result:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;the problem is just loading all records into the dates (date_pay | date_shipping)&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;PRE&gt;  PK_FileBaseName  | A | B | C | date_pay | date_shipping&lt;BR /&gt;1 &lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;5&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:02:23 GMT</pubDate>
    <dc:creator>edugallowk</dc:creator>
    <dc:date>2024-11-16T05:02:23Z</dc:date>
    <item>
      <title>Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517545#M437130</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Hello, I would like to request help from you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I have several TXT files and would like to open a table by downloading all the columns and once they have been replicated in a new column where the key is the name of the file.&lt;/SPAN&gt; &lt;SPAN class=""&gt;I need to get the due date for each file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;If I do a left join, it works, but it will have two tables and I want to consolidate all the content into just one table.&lt;/SPAN&gt; &lt;SPAN class=""&gt;When I use only LOAD, it brings information only from the first file it finds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Can someone help me?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;[PRELOAD1]:
LOAD
FileBaseName() as PK_FileBaseName,
[A],
[B],
[C]
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, embedded labels, delimiter is '#', msq, header is 5 lines)
;

/////////////////////////////////////////////////////////////////////////////////////////////

[PRELOAD2]:
LOAD DISTINCT 
FileBaseName() as PK_FileBaseName,
date_pay,
date_shipping
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)
;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I tried to use something described below in the PRELOAD2 table, but the result allowed the same.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;vPath = 'lib://AMIL/';
For each File in FileList('$(vPath)/DM*.txt')

Left join 

[PRELOAD2]:
LOAD DISTINCT &lt;BR /&gt;FileBaseName() as PK_FileBaseName, &lt;BR /&gt;date_pay, &lt;BR /&gt;date_shipping&lt;BR /&gt;FROM $(File)&lt;BR /&gt;(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)&lt;BR /&gt;Where WildMatch([@3],'Emissão*') &lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Next File;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="text-wrap tlid-copy-target"&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Expected result:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;the problem is just loading all records into the dates (date_pay | date_shipping)&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;PRE&gt;  PK_FileBaseName  | A | B | C | date_pay | date_shipping&lt;BR /&gt;1 &lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;5&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:02:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517545#M437130</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2024-11-16T05:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517555#M437131</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Cant you do&lt;/P&gt;&lt;P&gt;[PRELOAD1]:&lt;BR /&gt;LOAD&lt;BR /&gt;FileBaseName() as PK_FileBaseName,&lt;BR /&gt;[A],&lt;BR /&gt;[B],&lt;BR /&gt;[C]&lt;BR /&gt;FROM [lib://AMIL/DM_*.txt]&lt;BR /&gt;(txt, codepage is 28591, embedded labels, delimiter is '#', msq, header is 5 lines)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join([PRELOAD1])&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt;FileBaseName() as PK_FileBaseName,&lt;BR /&gt;date_pay,&lt;BR /&gt;date_shipping&lt;BR /&gt;FROM [lib://AMIL/DM_*.txt]&lt;BR /&gt;(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 17:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517555#M437131</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-06T17:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517565#M437132</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.png" style="width: 570px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1745i6A1B43BD15CD6418/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;Using left, the result is conformed to the image, that is, it fills only the data of a file, leaving the others without the information.&lt;/SPAN&gt; &lt;SPAN class=""&gt;Do you have any idea how I could handle this?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="text-wrap tlid-copy-target"&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Thank you!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Dec 2018 18:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517565#M437132</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2018-12-06T18:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517573#M437133</link>
      <description>&lt;P&gt;You have a where clause on the second table load. is that correct?&amp;nbsp;&lt;/P&gt;&lt;P&gt;that will only take the data where&amp;nbsp;@3 contains&amp;nbsp;Emissão.&lt;/P&gt;&lt;P&gt;So in your screenshot, the first row is DM_453653000_2018_09, does the&amp;nbsp;@3 column in that&amp;nbsp;file contain&amp;nbsp;Emissão?&lt;/P&gt;&lt;P&gt;Are you able to post any examples?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 18:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517573#M437133</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-06T18:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517598#M437135</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;Yes!&lt;/SPAN&gt; &lt;SPAN class=""&gt;I put a where clause in an attempt to group only the data I need.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;See in the drawing that there were only 11 different records.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 903px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1751iF390634828D63B5B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Screenshot_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517598#M437135</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2018-12-06T19:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517599#M437136</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;If using Left works, but I need to leave the result in a single table.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517599#M437136</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2018-12-06T19:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517613#M437138</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sorry, quick question.&lt;/P&gt;&lt;P&gt;In your second load you are loading&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;date_pay,
date_shipping&lt;/PRE&gt;&lt;P&gt;I can't find these fields in the files you attached.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517613#M437138</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-06T19:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517616#M437139</link>
      <description>&lt;P&gt;actually im guessing the fields are Emissao and vencimento?&lt;/P&gt;&lt;P&gt;Not sure why you have the english names in the script?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517616#M437139</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-06T20:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517626#M437155</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try this. You will have to change the FROM clause and maybe the&amp;nbsp;@1, @2 etc as i have done this in QlikView, but it would be the same as Qlik Sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;DatePayMap:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD&lt;BR /&gt;FileBaseName() as PK_FileBaseName,&lt;BR /&gt;subfield(@3,': ',2) as DatePay&lt;BR /&gt;FROM&lt;BR /&gt;[DM_*.txt]&lt;BR /&gt;(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)&lt;BR /&gt;Where WildMatch([@3],'Emissão*') ;&lt;/P&gt;&lt;P&gt;DateShippingMap:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD&lt;BR /&gt;FileBaseName() as PK_FileBaseName,&lt;BR /&gt;subfield(@4,': ',2) as DateShip&lt;BR /&gt;FROM&lt;BR /&gt;[DM_*.txt]&lt;BR /&gt;(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)&lt;BR /&gt;Where WildMatch([@3],'Emissão*') ;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PRELOAD1:&lt;BR /&gt;LOAD @1 as A,&lt;BR /&gt;@2 as B,&lt;BR /&gt;@3 as C,&lt;BR /&gt;FileBaseName() as PK_FileBaseName,&lt;BR /&gt;applymap('DatePayMap',FileBaseName(),null()) as Date_Pay,&lt;BR /&gt;applymap('DateShippingMap',FileBaseName(),null()) as Date_Shipping&lt;BR /&gt;FROM&lt;BR /&gt;[DM_*.txt]&lt;BR /&gt;(txt, codepage is 28591, no labels, delimiter is '#', header is 6 lines);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives the following result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 494px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1756iC4215C0A6531DAEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517626#M437155</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-06T20:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517653#M437159</link>
      <description>&lt;P&gt;Hello edugallowk ,&lt;/P&gt;&lt;P&gt;A couple issues here:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1st issue:&lt;/STRONG&gt;&lt;BR /&gt;Syntax of the load statements.&amp;nbsp; It looks like you're reading from the same series of files in both the first statement &amp;amp; the second statement.&amp;nbsp; This implies you've blended the record sets of the two load statements together into 1 file series (this would be unusual, but possible, with logic in the load script "untangle" the two subsets).&lt;/P&gt;&lt;P&gt;Another problem stems from the format of the second load statement attempting to load by named fields, in conjunction with the 'no labels' keyword.&lt;/P&gt;&lt;P&gt;In a "no labels" setting, your load statement would look more like this:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="1"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;@1&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;@2&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;@3&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[DM_*.txt]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;txt&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;codepage&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 1252, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;no&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;labels&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;delimiter&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; '#', &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;msq&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;header&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 5 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;lines&lt;/FONT&gt;&lt;FONT size="1"&gt;);&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;2nd Issue - sequencing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When you iterate through the second load statement, via &lt;EM&gt;'For each File in FileList('$(vPath)/DM*.txt')'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The first pass is performing a Left Join on a single key field 'PK_FileBaseName'.&lt;/P&gt;&lt;P&gt;On the second loop pass, both tables contain the fields&amp;nbsp; PK_FileBaseName, date_pay, date_shipping and join mechanics have converted to a 3 field compound key.&lt;/P&gt;&lt;P&gt;You need to concatenate all the collected files from the second load statement, then perform the Left Join a single time at the end&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[PRELOAD1]&lt;/FONT&gt;&lt;FONT size="1"&gt;:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;() &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;PK_FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[A]&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[B]&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[C]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;[DM_*.txt]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;txt&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;codepage&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 28591, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;embedded&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;labels&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;delimiter&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; '#', &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;msq&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;header&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 5 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;lines&lt;/FONT&gt;&lt;FONT size="1"&gt;)&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[PRELOAD2]&lt;/FONT&gt;&lt;FONT size="1"&gt;:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;DISTINCT&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;() &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;PK_FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;date_pay&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;date_shipping&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;[DM_*.txt]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;txt&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;codepage&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 28591, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;embedded&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;labels&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;delimiter&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; '#', &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;msq&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;header&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 5 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;lines&lt;/FONT&gt;&lt;FONT size="1"&gt;)&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;//(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;LEFT&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;JOIN&lt;/FONT&gt;&lt;FONT size="1"&gt;(PRELOAD1)&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;RESIDENT&lt;/FONT&gt;&lt;FONT size="1"&gt; PRELOAD2;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;DROP&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;TABLE&lt;/FONT&gt;&lt;FONT size="1"&gt; PRELOAD2; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Data files contents DM_01.txt:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;I&lt;BR /&gt;yam&lt;BR /&gt;a&lt;BR /&gt;5 line&lt;BR /&gt;header&lt;BR /&gt;A#B#C#date_pay#date_shipping&lt;BR /&gt;Ayyyy#Beeee#Ceeee#Friday#$5&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Data files contents DM_02.txt:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;I &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;yam&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;a&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;5 line&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;header&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;A#B#C#date_pay#date_shipping&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Deee#Eeee#eFFFF#Tuesday#$4&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 21:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517653#M437159</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-12-06T21:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517659#M437160</link>
      <description>&lt;P&gt;*reply test*&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 21:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517659#M437160</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-12-06T21:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517666#M437163</link>
      <description>&lt;P&gt;Hello edugallowk ,&lt;/P&gt;&lt;P&gt;A couple issues here:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1st issue:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Syntax of the load statements.&amp;nbsp; It looks like you're reading from the same series of files in both the first &amp;amp;&amp;nbsp;second statement.&amp;nbsp; This implies&amp;nbsp;a blending of&amp;nbsp;record sets of the two load statements together into 1 file series &lt;EM&gt;(this would be unusual, but possible, with logic in the load script "untangling" the two subsets).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Another problem stems from the format of the second load statement attempting to load by named fields, in conjunction with the &lt;EM&gt;'no labels'&lt;/EM&gt; keyword.&lt;/P&gt;&lt;P&gt;In a "no labels" setting, your load statement would look more like this:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="1"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;@1&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;AS&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;PK_FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;@2&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;AS&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;date_pay&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;@3&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;AS&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;date_shipping&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[DM_*.txt]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;txt&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;codepage&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 1252, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;no&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;labels&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;delimiter&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; '#', &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;msq&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;header&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 5 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;lines&lt;/FONT&gt;&lt;FONT size="1"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2nd Issue - sequencing &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;When you iterate through the second load statement, via &lt;FONT face="courier new,courier"&gt;'For each File in FileList('$(vPath)/DM*.txt')'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The first file found is performing a Left Join on a single key field 'PK_FileBaseName'.&lt;/P&gt;&lt;P&gt;On the second pass, both tables now contain the fields&amp;nbsp; &lt;FONT face="courier new,courier"&gt;PK_FileBaseName, date_pay, date_shipping&lt;/FONT&gt; and &amp;nbsp;join mechanics have converted to a 3 field compound key.&lt;/P&gt;&lt;P&gt;You need to concatenate all the collected files from the second table, before finally perform the Left Join a single time.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[PRELOAD1]&lt;/FONT&gt;&lt;FONT size="1"&gt;:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;() &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;PK_FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[A]&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[B]&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[C]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;[DM_*.txt]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;txt&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;codepage&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 28591, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;embedded&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;labels&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;delimiter&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; '#', &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;msq&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;header&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 5 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;lines&lt;/FONT&gt;&lt;FONT size="1"&gt;)&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[PRELOAD2]&lt;/FONT&gt;&lt;FONT size="1"&gt;:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;DISTINCT&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;() &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;PK_FileBaseName&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;date_pay&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;date_shipping&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;[DM_*.txt]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;txt&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;codepage&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 28591, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;embedded&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;labels&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;delimiter&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; '#', &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;msq&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;header&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; 5 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;lines&lt;/FONT&gt;&lt;FONT size="1"&gt;)&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;//(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;LEFT&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;JOIN&lt;/FONT&gt;&lt;FONT size="1"&gt;(PRELOAD1)&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;RESIDENT&lt;/FONT&gt;&lt;FONT size="1"&gt; PRELOAD2;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;DROP&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;TABLE&lt;/FONT&gt;&lt;FONT size="1"&gt; PRELOAD2; &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;contents of Data file DM_01.txt :&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;I &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;yam&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;a&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;5 line&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;header&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;A#B#C#date_pay#date_shipping&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Ayyyy#Beeee#Ceeee#Friday#$5&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;contents of Data file DM_02.txt:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;FONT face="courier new,courier" size="2"&gt;I &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;yam&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;a&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;5 line&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;header&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;A#B#C#date_pay#date_shipping&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Deee#Eeee#eFFFF#Tuesday#$4&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 21:40:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517666#M437163</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-12-06T21:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517956#M437197</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;Hello!&lt;/SPAN&gt; &lt;SPAN class=""&gt;I'm going to test the tips now and soon return with the result.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 12:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1517956#M437197</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2018-12-07T12:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518001#M437200</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;Hello, thank you very much for the directions.&lt;/SPAN&gt; &lt;SPAN&gt;I still find it difficult to merge the tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to merge the [PreLoad1] information with that of [Preload2] into a single table [BILLING.]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even using the method you suggested, I still encounter the same problems of joining and bringing all of their respective data regarding the dates of Preload2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It loads only the data of the first file that is found, ignoring the other files.&lt;/SPAN&gt; &lt;SPAN&gt;Any other tips?&lt;/SPAN&gt; &lt;SPAN&gt;Because they are multiple txt files, do not they have to do a Loop?&lt;/SPAN&gt; &lt;SPAN class=""&gt;If you have any other suggestions, I thank you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;PreLoad1:
LOAD
	[Código],
	[Beneficiário],
	[Matrícula],
	[CPF],
	[Plano],
	[Tipo],
	[Idade],
	if(IsNull([Dependência]) or [Dependência]='','Titular',[Dependência]) as [Dependência],
	Date([Data Limite] ) AS [Data Limite],
	[Data Inclusão],
	Date([Data Exclusão] ) AS [Data Exclusão],
	[Lotacao],
	[Rubrica],
    if(WildMatch(Rubrica,'Mens.*'),'1',
		if(WildMatch(Rubrica,'Co-participação*'),'2',
        if(WildMatch(Rubrica,'Cobrança*'),'3',
    	if(WildMatch(Rubrica,'Devolução*'),'4','Outros')))
    ) as [Rubrica_Custom],
	[Co-Participacao],
	[Outros],
	[Mensalidade],
	[Total Família],   
    
    /*Informações Adicionais*/
    SubField(FileDir(),'/',3) as Operadora_Grupo,
    SubField(FileBaseName(),'_',2) &amp;amp;REPEAT('0', 15 - LEN(SubField(FileBaseName(),'_',2))) as Subfatura_Custom,
    Date(Date#('01' &amp;amp;'/' &amp;amp;SubField(FileBaseName(),'_',4) &amp;amp;'/' &amp;amp;SubField(FileBaseName(),'_',3),'DD/MM/YYYY')) as Competencia_Vencimento,
    
    /*Informações do Arquivo*/
    FileDir() as FileDir,
    FileExtension() as FileExtension,
    FileName() as FileName,
    FilePath() as FilePath,
    FileSize() as FileSize,
    FileTime() as FileTime,
    FileBaseName() as PK_FileBaseName
FROM [lib://AMIL/DM_*.txt]
//FROM $(File)
(txt, codepage is 28591, embedded labels, delimiter is '#', msq, header is 5 lines)
Where WildMatch([Rubrica],'Mens.*')
;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I need to join the script below:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;DatePayMap:
Mapping
Load
    FileBaseName() as PK_FileBaseName,
    date(SubField([@4],' ',-1)) AS VENCIMENTO
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)
Where WildMatch([@3],'Emissão*')
;

DateShippingMap:
Mapping
Load
    FileBaseName() as PK_FileBaseName,
    date(SubField([@3],' ',-1)) AS EMISSAO
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)
Where WildMatch([@3],'Emissão*')
;

PreLoad2:
Load 
FileBaseName() as PK_FileBaseName,
applymap('DatePayMap',FileBaseName(),null()) as Date_Pay,
applymap('DateShippingMap',FileBaseName(),null()) as Date_Shipping
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)
Where WildMatch([@3],'Emissão*')
;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Problem:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_3.png" style="width: 896px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1810i7E8C2C65583DCF21/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_3.png" alt="Screenshot_3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;In file 1 it brings the data to the junction, when changing to file 2, 3, 4 and too much information is not filled in the junction. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 13:54:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518001#M437200</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2018-12-07T13:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518044#M437203</link>
      <description>&lt;P&gt;Hello Edugallowk,&lt;BR /&gt;&lt;BR /&gt;The wildcard load of a series of text files appears to be working fine.&amp;nbsp; This is demonstrated by the fact values in the field PK_FileBaseName show multiple file names.&lt;BR /&gt;&lt;BR /&gt;There's no requirement&amp;nbsp;these tables be unified down to a single table to test the MAPPING fields.&lt;BR /&gt;&lt;BR /&gt;Try deactivating the MAPPING keyword in DatePayMap &amp;amp; DateShippingMap, and let both of these two-column tables reside as leaf tables in the data model, associating to table [Preload1] on the key PK_FileBaseName.&lt;BR /&gt;&lt;BR /&gt;Exit the script before [Preload2].&amp;nbsp;&amp;nbsp;Then examine the table box that is supposed to report 'Date_Pay' &amp;amp; 'Date_Shipping'.&lt;BR /&gt;&lt;BR /&gt;If you don't see values in that form, then the problem may not be the syntax of your load statement, but the alignment between the two different passes at files FROM [lib://AMIL/DM_*.txt].&lt;BR /&gt;&lt;BR /&gt;The transactional rows with a 5 row header&amp;nbsp;Where WildMatch([Rubrica],'Mens.*') may not be lining up with date tagging rows using 2 row header Where WildMatch([@3],'Emissão*').&amp;nbsp;&lt;EM&gt;(are the important dates for each file&amp;nbsp;notated in header&amp;nbsp;lines 3-5? you may not have to make a full pass at loading the entire file to pluck these out, reduce the row band with where RecNo() &amp;lt; 6 or something like that)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Temporarily commenting out the //MAPPING keyword will let you examine the health of the mapping tables you're attempting to join into the fact tables.&lt;BR /&gt;&lt;BR /&gt;In a structural sense, not sure why you can't just do the two mapping tables first, APPLYMAP to [Preload1] and then skip [Preload2] in its entirety.&lt;BR /&gt;&lt;BR /&gt;1.&amp;nbsp; DatePayMap&lt;BR /&gt;2. DateShippingMap&lt;BR /&gt;3. Preload1&lt;BR /&gt;&lt;EM&gt;(Preload 2 is unnecessary)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 15:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518044#M437203</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-12-07T15:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518048#M437204</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14263"&gt;@edugallowk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Yes as&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28416"&gt;@evan_kurowski&lt;/a&gt;&amp;nbsp;suggests, In my example i provided, i am doing the mapping loads first then applying them to the first load.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that not work as it seemed to work in my example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need to do the 2nd load.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 15:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518048#M437204</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-07T15:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518055#M437205</link>
      <description>&lt;P&gt;Try this..&lt;/P&gt;&lt;PRE&gt;DatePayMap:
Mapping
LOAD 
	 FileBaseName() as PK_FileBaseName,
     date(SubField([@3],' ',-1)) AS EMISSAO
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)
Where WildMatch([@3],'Emissão*') ;

DateShippingMap:
Mapping
LOAD 
	 FileBaseName() as PK_FileBaseName,
     date(SubField([@4],' ',-1)) AS VENCIMENTO
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, no labels, comment is TESTE, delimiter is '#', no quotes, header is 2 lines, no eof)
Where WildMatch([@3],'Emissão*') ;

PreLoad1:
LOAD
	[Código],
	[Beneficiário],
	[Matrícula],
	[CPF],
	[Plano],
	[Tipo],
	[Idade],
	if(IsNull([Dependência]) or [Dependência]='','Titular',[Dependência]) as [Dependência],
	Date([Data Limite] ) AS [Data Limite],
	[Data Inclusão],
	Date([Data Exclusão] ) AS [Data Exclusão],
	[Lotacao],
	[Rubrica],
    if(WildMatch(Rubrica,'Mens.*'),'1',
		if(WildMatch(Rubrica,'Co-participação*'),'2',
        if(WildMatch(Rubrica,'Cobrança*'),'3',
    	if(WildMatch(Rubrica,'Devolução*'),'4','Outros')))
    ) as [Rubrica_Custom],
	[Co-Participacao],
	[Outros],
	[Mensalidade],
	[Total Família],   
    
    /*Informações Adicionais*/
    SubField(FileDir(),'/',3) as Operadora_Grupo,
    SubField(FileBaseName(),'_',2) &amp;amp;REPEAT('0', 15 - LEN(SubField(FileBaseName(),'_',2))) as Subfatura_Custom,
    Date(Date#('01' &amp;amp;'/' &amp;amp;SubField(FileBaseName(),'_',4) &amp;amp;'/' &amp;amp;SubField(FileBaseName(),'_',3),'DD/MM/YYYY')) as Competencia_Vencimento,
    
    /*Informações do Arquivo*/
    FileDir() as FileDir,
    FileExtension() as FileExtension,
    FileName() as FileName,
    FilePath() as FilePath,
    FileSize() as FileSize,
    FileTime() as FileTime,
    FileBaseName() as PK_FileBaseName,
    applymap('DatePayMap',FileBaseName(),null()) as Date_Pay,
    applymap('DateShippingMap',FileBaseName(),null()) as Date_Shipping
FROM [lib://AMIL/DM_*.txt]
(txt, codepage is 28591, embedded labels, delimiter is '#', msq, header is 5 lines)
Where WildMatch([Rubrica],'Mens.*');&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 15:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518055#M437205</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-07T15:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518063#M437206</link>
      <description>&lt;P&gt;Ok, I'm a little irritated with the forum here.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;First I haven't seen any of Hopkinsc's posts on this thread until a few moments ago, and they all showed up AFTER I posted the solution &lt;EM&gt;(or two solutions, as the first problem was addressed, then a new problem presented, and a second solution proposed).&lt;/EM&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But from my perspective this appeared as time-sequencing,&amp;nbsp;as&amp;nbsp;if&amp;nbsp;Hopkinsc got to go back in time and insert his responses&amp;nbsp;into the thread mid-stream, earlier in the chronological&amp;nbsp;timeline.&lt;BR /&gt;&lt;BR /&gt;If this kind of "time-travel" happens again,&amp;nbsp;might be an&amp;nbsp;inducement to curtail community usage.&amp;nbsp; &lt;EM&gt;(not trying to blame you Hopkins, but this is how the site revealed sequencing to me)&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 15:26:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518063#M437206</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-12-07T15:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518066#M437207</link>
      <description>&lt;P&gt;I am finding this site a little irritating since it has been updated. sometimes not being refreshed, sometimes very very slow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assure you that i have not got a time machine and i am actually posting my comments correctly and at the times specified &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have had commented 5 times and &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14263"&gt;@edugallowk&lt;/a&gt;&amp;nbsp;had responded to them before you posted your first message of 'reply test'. So it does look like an issue with the site.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 15:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518066#M437207</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2018-12-07T15:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join Multiple Files TXT</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518073#M437209</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22226"&gt;@hopkinsc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I am finding this site a little irritating since it has been updated. sometimes not being refreshed, sometimes very very slow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assure you that i have not got a time machine and i am actually posting my comments correctly and at the times specified &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have had commented 5 times and &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14263"&gt;@edugallowk&lt;/a&gt;&amp;nbsp;had responded to them before you posted your first message of 'reply test'. So it does look like an issue with the site.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yeah, none of those responses displayed on my browser-session, as far as I was aware I was first responder.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've seen retroactive insertion on social media sites, but credit stealing was an issue with the old Community site.&amp;nbsp; You could have posters marking wrong answers, skipping over multiple responses that were applicable, or just getting their query satisfied&amp;nbsp;to leave the thread unanswered.&amp;nbsp; 'Community' implies a bit of social responsibility, hope the new site attempts to cure any corruptions of the predecessor.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 15:40:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-Multiple-Files-TXT/m-p/1518073#M437209</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-12-07T15:40:49Z</dc:date>
    </item>
  </channel>
</rss>

