<?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: Eliminate duplicates in a QV script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018149#M925075</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;load * &lt;/P&gt;&lt;P&gt;from....&lt;/P&gt;&lt;P&gt;where right(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;contrato1,1)&amp;lt;&amp;gt;'D'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ariel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Apr 2016 12:27:32 GMT</pubDate>
    <dc:creator>ariel_klien</dc:creator>
    <dc:date>2016-04-12T12:27:32Z</dc:date>
    <item>
      <title>Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018145#M925071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a file with duplicates, the way to detect a dup is tha the code has a D at the final&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;100D&lt;/P&gt;&lt;P&gt;101&lt;/P&gt;&lt;P&gt;102&lt;/P&gt;&lt;P&gt;103&lt;/P&gt;&lt;P&gt;103D&lt;/P&gt;&lt;P&gt;104&lt;/P&gt;&lt;P&gt;105&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to eliminate dups and I know the right one is the one with D al the ened.&lt;/P&gt;&lt;P&gt;In this case, the file with not dups will be&lt;/P&gt;&lt;P&gt;100D&lt;/P&gt;&lt;P&gt;101&lt;/P&gt;&lt;P&gt;102&lt;/P&gt;&lt;P&gt;103&lt;/P&gt;&lt;P&gt;104&lt;/P&gt;&lt;P&gt;105&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made a script, but&amp;nbsp; think I do too many steps, can&amp;nbsp; do this in a easier way, with less steps.&lt;/P&gt;&lt;P&gt;My file has 10 million rows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contratos:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD text(@1) as contrato1, left(@1,3) as contrato_aux&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;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Contratos2:&lt;/P&gt;&lt;P&gt;LOAD contrato_aux, contrato1 Resident Contratos Order by contrato1 DESC ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Contratos3:&lt;/P&gt;&lt;P&gt;LOAD contrato1, contrato_aux, contrato_aux as contrato_aux1&lt;/P&gt;&lt;P&gt;Resident Contratos2 WHERE NOT Exists (contrato_aux1, contrato_aux); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Contratos;&lt;/P&gt;&lt;P&gt;DROP Table Contratos2; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018145#M925071</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018146#M925072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use &lt;/P&gt;&lt;P class="syntax" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN class="Bold" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;PurgeChar(&lt;/SPAN&gt;&lt;SPAN class="Italic" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;s1, s2&lt;/SPAN&gt;&lt;SPAN class="Bold" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Returns the string &lt;SPAN class="Italic" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;s1&lt;/SPAN&gt; less all characters contained in string &lt;SPAN class="Italic" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;s2&lt;/SPAN&gt;.&lt;/P&gt;&lt;P class="example" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Example:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN class="Code" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;purgechar ( 'q1li2kview3','123' ) &lt;/SPAN&gt;returns '&lt;SPAN class="Italic" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;qlikview&lt;/SPAN&gt;'&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 12:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018146#M925072</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-04-12T12:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018147#M925073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happened to 103D?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 12:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018147#M925073</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-12T12:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018148#M925074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Purgechar is a QlikView Function not a Foxpro one. You should use it in the LOAD part of your statement not in the SQL SELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD Purgechar(&lt;STRONG&gt;Field&lt;/STRONG&gt;,'D') AS &lt;STRONG&gt;Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT&lt;STRONG&gt; Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM TABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Using purgechar after the SQL sentence will cause an error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 12:26:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018148#M925074</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-04-12T12:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018149#M925075</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;load * &lt;/P&gt;&lt;P&gt;from....&lt;/P&gt;&lt;P&gt;where right(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;contrato1,1)&amp;lt;&amp;gt;'D'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ariel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 12:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018149#M925075</guid>
      <dc:creator>ariel_klien</dc:creator>
      <dc:date>2016-04-12T12:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018150#M925076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry....103 is the right one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output needed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;100D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;101&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;102&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;103D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;104&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;105&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 13:11:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018150#M925076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-12T13:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018151#M925077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My problem is my field is unique, y key is Field1 and when is repated appear:&lt;/P&gt;&lt;P&gt;field&lt;/P&gt;&lt;P&gt;fieldD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when is no repeated appear only field (not other row with fieldD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I have two rows &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;100D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need 100D in the output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have&lt;/P&gt;&lt;P&gt;102&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need 102 in the output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the one with D at the end if the code is repeated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 13:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018151#M925077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-12T13:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018152#M925078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not the problem...., thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 13:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018152#M925078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-12T13:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate duplicates in a QV script</title>
      <link>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018153#M925079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't want to purge the 'D' this is not the problme&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 13:15:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Eliminate-duplicates-in-a-QV-script/m-p/1018153#M925079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-12T13:15:45Z</dc:date>
    </item>
  </channel>
</rss>

