<?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 with timestamps in file name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Left-Join-multiple-files-with-timestamps-in-file-name/m-p/257521#M1205006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to expand the following script to incorporate multiple files which I receive daily. Note that the daily files has Account ID's in it which I want to filter out by doing a Left Join.&lt;/P&gt;&lt;P&gt;LOAD Account_ID,&lt;BR /&gt; Client&lt;BR /&gt;FROM&lt;BR /&gt;[Data.xls](....);&lt;/P&gt;&lt;P&gt;Left Join LOAD&lt;BR /&gt; Account_ID,&lt;BR /&gt; '31/03/2010' as Date&lt;BR /&gt;FROM [CRM\Value_20100331.txt](...);&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;To load the daily files, I changed the last line of script to:&lt;BR /&gt;FROM [CRM\Value_*.txt](...);&lt;/P&gt;&lt;P&gt;1. How do I assign the timestamp in the file name to [Date]&lt;BR /&gt;2. How do I change the code to ensure that the Left Join function keeps applying with the first file and not continously on eachother as I add daily CRM files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 May 2010 20:34:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-16T20:34:26Z</dc:date>
    <item>
      <title>Left Join - multiple files with timestamps in file name</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-multiple-files-with-timestamps-in-file-name/m-p/257521#M1205006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to expand the following script to incorporate multiple files which I receive daily. Note that the daily files has Account ID's in it which I want to filter out by doing a Left Join.&lt;/P&gt;&lt;P&gt;LOAD Account_ID,&lt;BR /&gt; Client&lt;BR /&gt;FROM&lt;BR /&gt;[Data.xls](....);&lt;/P&gt;&lt;P&gt;Left Join LOAD&lt;BR /&gt; Account_ID,&lt;BR /&gt; '31/03/2010' as Date&lt;BR /&gt;FROM [CRM\Value_20100331.txt](...);&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;To load the daily files, I changed the last line of script to:&lt;BR /&gt;FROM [CRM\Value_*.txt](...);&lt;/P&gt;&lt;P&gt;1. How do I assign the timestamp in the file name to [Date]&lt;BR /&gt;2. How do I change the code to ensure that the Left Join function keeps applying with the first file and not continously on eachother as I add daily CRM files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 May 2010 20:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-multiple-files-with-timestamps-in-file-name/m-p/257521#M1205006</guid>
      <dc:creator />
      <dc:date>2010-05-16T20:34:26Z</dc:date>
    </item>
    <item>
      <title>Left Join - multiple files with timestamps in file name</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-multiple-files-with-timestamps-in-file-name/m-p/257522#M1205007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can solve your problem by the following way:&lt;/P&gt;&lt;P&gt;01. Make a folder like C:\CRM and put your all .txt file here. If you want to pick the date from the file name then&lt;/P&gt;&lt;P&gt;give the file name like this: 150510.txt, 160510.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;02. Write the code like this;&lt;/P&gt;&lt;P&gt;Directory (C:\CRM);&lt;/P&gt;&lt;P&gt;For each TextFile in filelist ('*.txt')&lt;/P&gt;&lt;P&gt;sFileName=right('$(TextFile)',10);&lt;/P&gt;&lt;P&gt;sFileName=left(sFileName,6);&lt;/P&gt;&lt;P&gt;FileDate=makedate('20' &amp;amp; right(sFileName,2),Mid(sFileName,3,2),Left(sFileName,2));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;'$(FileDate)' as crm_date,&lt;/P&gt;&lt;P&gt;Account_ID,&lt;/P&gt;&lt;P&gt;Name&lt;/P&gt;&lt;P&gt;From $(TextFile) (txt, codepage is 1252, embedded labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next TextFile;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join LOAD Account_ID,&lt;/P&gt;&lt;P&gt;Addr,&lt;/P&gt;&lt;P&gt;Addr1&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\CRM\List.xls&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;03. No need to change script every day.&lt;/P&gt;&lt;P&gt;It may help you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Zaman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 04:43:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-multiple-files-with-timestamps-in-file-name/m-p/257522#M1205007</guid>
      <dc:creator />
      <dc:date>2010-05-17T04:43:29Z</dc:date>
    </item>
  </channel>
</rss>

