<?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: Replace characters in all the data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689120#M249552</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do get your point, Gysbert.&lt;/P&gt;&lt;P&gt;This situation is hardcore and the input files cannot be changed in the way you have suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be clear, I have found out that the data is in ISO 8859-13 format and should be changed to Windows-1251. I am quite a newbie myself so didn't get it at first sight &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Sep 2014 13:51:30 GMT</pubDate>
    <dc:creator>MindaugasBacius</dc:creator>
    <dc:date>2014-09-25T13:51:30Z</dc:date>
    <item>
      <title>Replace characters in all the data</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689117#M249549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello my dears,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to replace characters in all the table fields.&lt;/P&gt;&lt;P&gt;Let's say I do have a table (the real table is huge with millions of rows and around 100 columns):&lt;/P&gt;&lt;P&gt;Header1 Header2&lt;/P&gt;&lt;P&gt;AA2A 2DDD&lt;/P&gt;&lt;P&gt;BBB1 EEE1&lt;/P&gt;&lt;P&gt;1CCC FF1F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to replace:&lt;/P&gt;&lt;P&gt;1 to 3&lt;/P&gt;&lt;P&gt;2 to 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I manage to do it by testing the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ReplaceMap:&lt;/P&gt;&lt;P&gt;MAPPING LOAD * INLINE [ &lt;/P&gt;&lt;P&gt;char replace&lt;/P&gt;&lt;P&gt;1 3&lt;/P&gt;&lt;P&gt;2 4&lt;/P&gt;&lt;P&gt;] (delimiter is ' '); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TestData:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;MapSubString('ReplaceMap', Header1) as ReplacedString1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;MapSubString('ReplaceMap', Header2) as ReplacedString2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Header1 Header2&lt;/P&gt;&lt;P&gt;AA2A 2DDD&lt;/P&gt;&lt;P&gt;BBB1 EEE1&lt;/P&gt;&lt;P&gt;1CCC FF1F&lt;/P&gt;&lt;P&gt;] (delimiter is ' '); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is correct.&lt;/P&gt;&lt;P&gt;But I do wonder if I could optimize the script and remove the loading time. Also, maybe there is a good practise examples of such a task.&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 20:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689117#M249549</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2014-09-24T20:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters in all the data</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689118#M249550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Best practice is to fix the problem as close as possible to the source. Maybe you can do this in the source database. Your database administrator should be able to come up with a solution using regular expressions and/or a udf. Or &lt;/P&gt;&lt;P&gt;perhaps you can dump the table to a text file first and use a sed or perl script to replace the characters and then read in the corrected text file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 08:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689118#M249550</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-09-25T08:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters in all the data</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689119#M249551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;otherwise you would have to use it for each field like this:&lt;/P&gt;&lt;P&gt;DemoTable:&lt;/P&gt;&lt;P&gt;Load replace(replace(Field1,'1','3'),'2','4') as Field1,....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 09:03:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689119#M249551</guid>
      <dc:creator>tobias_klett</dc:creator>
      <dc:date>2014-09-25T09:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters in all the data</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689120#M249552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do get your point, Gysbert.&lt;/P&gt;&lt;P&gt;This situation is hardcore and the input files cannot be changed in the way you have suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be clear, I have found out that the data is in ISO 8859-13 format and should be changed to Windows-1251. I am quite a newbie myself so didn't get it at first sight &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 13:51:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-characters-in-all-the-data/m-p/689120#M249552</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2014-09-25T13:51:30Z</dc:date>
    </item>
  </channel>
</rss>

