<?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: Ignore text after a special character in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Ignore-text-after-a-special-character/m-p/449564#M167773</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt, thanks for teh reply. I could only get this to work on those records where the address contains ':'. I would ike it to include the other entries as well e.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anystreet AB11YZ: 9876&lt;/P&gt;&lt;P&gt;anyplace AB114NB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above would turn out: -&lt;/P&gt;&lt;P&gt;AB11YZ&lt;/P&gt;&lt;P&gt;AB114NB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2012 11:24:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-28T11:24:29Z</dc:date>
    <item>
      <title>Ignore text after a special character</title>
      <link>https://community.qlik.com/t5/QlikView/Ignore-text-after-a-special-character/m-p/449562#M167771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a string which is a persons address, often this ends with a postcode ....AB11AB, or something the postcode will be AB121AB. I used an expression found on here to extract the postcode if it is the last part of the string: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; REPLACE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRIM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (right(PatientFullAddress,7)&amp;nbsp; &amp;amp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subfield&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (subfield&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (PatientFullAddress,right&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (PatientFullAddress,7)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,' ','')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,' ','') as PatientPostcode2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; left(subfield(Postcode,' ',1),len(subfield(Postcode,' ',1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have found the address string sometimes has AB11AB : house number (Insert a number here for this example). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I use the above but exclude all of the text after the ':', or is there a way to improve what I have already? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 15:44:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ignore-text-after-a-special-character/m-p/449562#M167771</guid>
      <dc:creator />
      <dc:date>2012-09-27T15:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore text after a special character</title>
      <link>https://community.qlik.com/t5/QlikView/Ignore-text-after-a-special-character/m-p/449563#M167772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To isolate everything prior to the ':' I'd look to use something in the load script like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left(MyValues,index(MyValues,':')-2) as MyVlaues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That assumes you have a space between the end of the PostCode and the ':'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously replace 'MyValues' with your text string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;P&gt;Qlikview Design Blog: &lt;A href="http://QVDesign.wordpress.com"&gt;http://QVDesign.wordpress.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;@QlikviewBI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 16:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ignore-text-after-a-special-character/m-p/449563#M167772</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2012-09-27T16:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore text after a special character</title>
      <link>https://community.qlik.com/t5/QlikView/Ignore-text-after-a-special-character/m-p/449564#M167773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt, thanks for teh reply. I could only get this to work on those records where the address contains ':'. I would ike it to include the other entries as well e.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anystreet AB11YZ: 9876&lt;/P&gt;&lt;P&gt;anyplace AB114NB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above would turn out: -&lt;/P&gt;&lt;P&gt;AB11YZ&lt;/P&gt;&lt;P&gt;AB114NB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 11:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ignore-text-after-a-special-character/m-p/449564#M167773</guid>
      <dc:creator />
      <dc:date>2012-09-28T11:24:29Z</dc:date>
    </item>
  </channel>
</rss>

