<?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: Load multiple files with some missing some colums in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982939#M335453</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌it is not possible .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Sep 2015 00:46:34 GMT</pubDate>
    <dc:creator>qlikviewwizard</dc:creator>
    <dc:date>2015-09-19T00:46:34Z</dc:date>
    <item>
      <title>Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982932#M335446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don' t seem to find the answer to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to load multiple CSV files, in which the columns are named, but some of them miss some columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file 1 to n have columns (a,b,c,d)&lt;/P&gt;&lt;P&gt;file n+1 to p have columns (a,b,c,d,e)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if my load scripts tries to read column 'e' I get an error for files 1 to n.&lt;/P&gt;&lt;P&gt;How can I prevent this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 15:37:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982932#M335446</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-18T15:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982933#M335447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can take a look at here. &lt;A href="https://community.qlik.com/docs/DOC-5721"&gt;A file checker utility for file based data sources&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 15:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982933#M335447</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2015-09-18T15:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982934#M335448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I get your idea, but this seems an overkill for my case.&lt;/P&gt;&lt;P&gt;Is there really no way in Qlikview load scripts to do something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;a as [field a],&lt;/P&gt;&lt;P&gt;b as [field b],&lt;/P&gt;&lt;P&gt;c as [field c],&lt;/P&gt;&lt;P&gt;d as [field d],&lt;/P&gt;&lt;P&gt;if (e exists, e, null) as [field d]&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 15:48:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982934#M335448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-18T15:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982935#M335449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think load * from files can work. try it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 16:00:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982935#M335449</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2015-09-18T16:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982936#M335450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this one . Its helpful for you.&lt;/P&gt;&lt;P&gt;let vs='File n+1';&lt;/P&gt;&lt;P&gt;FOR Each vs in 'Fil 1','File n+1';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is $(vs));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT vs;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 16:36:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982936#M335450</guid>
      <dc:creator>maniram23</dc:creator>
      <dc:date>2015-09-18T16:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982937#M335451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;set concat='';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for Each file in FileList('*.csv')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="line-height: 1.5em; font-size: 10pt;"&gt;&amp;nbsp; table:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; $(concat)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; load&amp;nbsp; &lt;/EM&gt;&lt;EM&gt;&amp;nbsp; *,&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;EM&gt;'$(file)' as filename&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; from $(file);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; set concat=' concatenate (table) ';&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEXT;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 16:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982937#M335451</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-09-18T16:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982938#M335452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no way inside from a load to check if fields are existing or not. The easiest way would be the suggestions below from &lt;A href="https://community.qlik.com/qlik-users/10670"&gt;maxgro&lt;/A&gt;‌- use it, it's easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 18:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982938#M335452</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-18T18:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982939#M335453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌it is not possible .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Sep 2015 00:46:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982939#M335453</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-09-19T00:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982940#M335454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is probably it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2015 07:51:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982940#M335454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T07:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982941#M335455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you checked the solution which had &lt;A href="https://community.qlik.com/qlik-users/10670"&gt;maxgro&lt;/A&gt; suggested above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2015 08:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982941#M335455</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-21T08:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982942#M335456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD * FROM&lt;/P&gt;&lt;P&gt;[.\Source\*.csv]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ';', msq);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;QlikView should do an automatic concatenate and the missing fields will be populated with Nulls().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If none of the files contain field e, but you use field e later in the script, then you could do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;BR /&gt;Load null() as a,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null() as b,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null() as c,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null() as d,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null() as e&lt;/P&gt;&lt;P&gt;autogenerate 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate(Table)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD * FROM&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;[.\Source\*.csv]&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ';', msq);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2015 09:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982942#M335456</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2015-09-21T09:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982943#M335457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK this allows me to load everthing correctly in the table "table", but as I do some transformation at load time, I should do that in two steps I guess like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//First solution provided by maxgro to load in temp table&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set concat='';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for Each file in FileList('*.csv')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp; table:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; $(concat)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; load&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&amp;nbsp;&amp;nbsp; '$(file)' as filename&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; from $(file);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; set concat=' concatenate (table) ';&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEXT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//Then do my transformations&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;noconcatenate&lt;/P&gt;&lt;P&gt;realtable:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a as [field a],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b as [field b],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if c=1, 'OK', 'KO') as [field c], //stupid transformation example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d as [field d],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(isnull(e), 'No field e', e) as [field e] //Works now&lt;/P&gt;&lt;P&gt;resident table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table table;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2015 11:18:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982943#M335457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T11:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files with some missing some colums</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982944#M335458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Implemented maxgro solution (see answer above) and it works.&lt;/P&gt;&lt;P&gt;qlikviewwizard is also right though, as you point it "There is no way inside from a load to check if fields are existing or not"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2015 11:24:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-files-with-some-missing-some-colums/m-p/982944#M335458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T11:24:49Z</dc:date>
    </item>
  </channel>
</rss>

