<?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: Avoid errors due to duplicate field_names in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Avoid-errors-due-to-duplicate-field-names/m-p/1351125#M619072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vineeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't yet quite understand you.&lt;/P&gt;&lt;P&gt;Anyway, for starters I'll try to structure my code a bit more - it is very&amp;nbsp; complex as there are several IF_THEN_clauses within the loop. And I'll build an info into the messagebox as to how many iterations there are going to be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Know what, I'll just leave it - the entire thing is about correcting some errors in the underlying Excel_file, but the error is only in a handful of records and it's a lot more complicated to automatically fix those in QV than to just display the facts and quickly fix the errors in the base_file.&lt;/P&gt;&lt;P&gt;With the thought in mind that any successor of mine should be able to understand and maintain the code, I'll try to avoid that enormous unnecessary complexity and just have a messagebox telling &amp;gt;&amp;gt;whoever is running the script&amp;lt;&amp;lt; to fix those errors in the base_file and, if possible, tell him how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot anyway!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 May 2017 10:24:14 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2017-05-16T10:24:14Z</dc:date>
    <item>
      <title>Avoid errors due to duplicate field_names</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-errors-due-to-duplicate-field-names/m-p/1351123#M619070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem:&lt;/P&gt;&lt;P&gt;In a big loop, a table is created, let's say the name is [error_table] - then, within the loop (under certain circumstances) I create a second version of that, going&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;error_table_v2: LOAD *,&amp;nbsp; ... RESIDENT error_table;&lt;/P&gt;&lt;P&gt;DROP TABLE error_table;&lt;/P&gt;&lt;P&gt;RENAME TABLE error_table_v2 TO error_table;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; So after that I have a table identical to the original [error_table], only with a few fields more - but that is just in the first iteration of the loop!&lt;/P&gt;&lt;P&gt;In the second iteration, of course the same code is executed again and due to that &amp;gt;&amp;gt; * &amp;lt;&amp;lt;, I get the error message that field_names must not be duplicated in a table.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; Explicitly naming only the fields from the original table in the LOAD would probably not be a solution because that way I'd lose the information I have generated in the first iteration?&lt;/P&gt;&lt;P&gt;Can anyone give me a hint on how to deal with this? Generating a new fieldname for every iteration of the loop would be quite cumbersome because I'd have to mix them all into one afterwards. Is there an easier way?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-errors-due-to-duplicate-field-names/m-p/1351123#M619070</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2017-05-16T09:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid errors due to duplicate field_names</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-errors-due-to-duplicate-field-names/m-p/1351124#M619071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using Qualify() maybe?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-errors-due-to-duplicate-field-names/m-p/1351124#M619071</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-05-16T09:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid errors due to duplicate field_names</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-errors-due-to-duplicate-field-names/m-p/1351125#M619072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vineeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't yet quite understand you.&lt;/P&gt;&lt;P&gt;Anyway, for starters I'll try to structure my code a bit more - it is very&amp;nbsp; complex as there are several IF_THEN_clauses within the loop. And I'll build an info into the messagebox as to how many iterations there are going to be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Know what, I'll just leave it - the entire thing is about correcting some errors in the underlying Excel_file, but the error is only in a handful of records and it's a lot more complicated to automatically fix those in QV than to just display the facts and quickly fix the errors in the base_file.&lt;/P&gt;&lt;P&gt;With the thought in mind that any successor of mine should be able to understand and maintain the code, I'll try to avoid that enormous unnecessary complexity and just have a messagebox telling &amp;gt;&amp;gt;whoever is running the script&amp;lt;&amp;lt; to fix those errors in the base_file and, if possible, tell him how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot anyway!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 10:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-errors-due-to-duplicate-field-names/m-p/1351125#M619072</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2017-05-16T10:24:14Z</dc:date>
    </item>
  </channel>
</rss>

