<?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 fields with different name into one. in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708137#M3293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To give you a full solution you can do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load * from path\*.csv etc.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;rangemax(stunum, Id, Sunum, StuNum, ID, PrintID, id) as Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;resident Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;drop table Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop fields stunum, Id, Sunum, StuNum, ID, PrintID, id;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2014 18:59:44 GMT</pubDate>
    <dc:creator>simenkg</dc:creator>
    <dc:date>2014-08-19T18:59:44Z</dc:date>
    <item>
      <title>Load multiple fields with different name into one.</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708132#M3288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif';"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have an issue. I am trying to load&lt;BR /&gt;csv file data from a folder. The 30+csv files have 7 different names for the&lt;BR /&gt;same data. I want to load all files (*.csv) as 1 field. Example below. (not all&lt;BR /&gt;files will have all names listed. Each will have only 1 variation) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stunum as Student_Id,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id as Student_Id,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stunum as Student_Id,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StuNum as Student_Id, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID as Student_Id,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintID as Student_Id, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id as Student_Id,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 16:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708132#M3288</guid>
      <dc:creator>danm84306</dc:creator>
      <dc:date>2014-08-19T16:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple fields with different name into one.</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708133#M3289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i was thinking the field names may not be important as you can use the @ sign to bring in the first field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just make sure you specify if there are leading rows to ignore.&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;&amp;nbsp; @1 as ID&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;(txt, codepage is 1252, no labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attached are the 2 CSV files i tested with. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 17:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708133#M3289</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-08-19T17:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple fields with different name into one.</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708134#M3290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This wil not work. the field is in a different column on each file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 17:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708134#M3290</guid>
      <dc:creator>danm84306</dc:creator>
      <dc:date>2014-08-19T17:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple fields with different name into one.</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708135#M3291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;K.&amp;nbsp; I'll try dig around for some code that will read the field headers to see whats there and then pull only the relevant field for each file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 18:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708135#M3291</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-08-19T18:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple fields with different name into one.</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708136#M3292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how about:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;rangemax(stunum, Id, Sunum, StuNum, ID, PrintID, id) as Student_Id&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 18:56:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708136#M3292</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-08-19T18:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple fields with different name into one.</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708137#M3293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To give you a full solution you can do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load * from path\*.csv etc.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;rangemax(stunum, Id, Sunum, StuNum, ID, PrintID, id) as Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;resident Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;drop table Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop fields stunum, Id, Sunum, StuNum, ID, PrintID, id;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 18:59:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708137#M3293</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-08-19T18:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple fields with different name into one.</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708138#M3294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or how about the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the following statement after your load statement which reads fields and data from the csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rename fields using Mapping_Rename_Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Mapping_Rename_Table is defined (has to be before the load statement from csv file) as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mapping_Rename_Table:&lt;/P&gt;&lt;P&gt;mapping load * inline[&lt;/P&gt;&lt;P&gt;%Oldname, %Newname&lt;/P&gt;&lt;P&gt;stunum, Student_Id&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;Id, Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;Stunum, Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;StuNum, Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;ID, Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;PrintID, Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Book Antiqua','serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;id, Student_Id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this way you can actually load all the files and not worry about which csv has which variation of student_id field name. in fact, you can add any other fields that you want to rename to the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace % with whatever hide prefix you set. if there isn't one already set, you can set it using the following statement after the standard set statements in the Main script tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set hideprefix = '%';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 19:08:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Load-multiple-fields-with-different-name-into-one/m-p/708138#M3294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-19T19:08:17Z</dc:date>
    </item>
  </channel>
</rss>

