<?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 Return single string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Return-single-string/m-p/425393#M158451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Customer field, which contains a proper name, for example 'Sony', which has a duplicate, yet different name in the same field, example &lt;/P&gt;&lt;P&gt;'Sony&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123a'. I'd like to strip out the 123a and just return the 'Sony', or at least the first record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function that could remove or delete the remaining characters after 'Sony'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 May 2013 04:46:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-04T04:46:30Z</dc:date>
    <item>
      <title>Return single string</title>
      <link>https://community.qlik.com/t5/QlikView/Return-single-string/m-p/425393#M158451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Customer field, which contains a proper name, for example 'Sony', which has a duplicate, yet different name in the same field, example &lt;/P&gt;&lt;P&gt;'Sony&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123a'. I'd like to strip out the 123a and just return the 'Sony', or at least the first record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function that could remove or delete the remaining characters after 'Sony'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 04:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-single-string/m-p/425393#M158451</guid>
      <dc:creator />
      <dc:date>2013-05-04T04:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return single string</title>
      <link>https://community.qlik.com/t5/QlikView/Return-single-string/m-p/425394#M158452</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;Try this syntax it will give you output as you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=subfield(PurgeChar('Sony&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123a',chr(39)),' ') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nirav Bhimani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 07:19:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-single-string/m-p/425394#M158452</guid>
      <dc:creator>nirav_bhimani</dc:creator>
      <dc:date>2013-05-04T07:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return single string</title>
      <link>https://community.qlik.com/t5/QlikView/Return-single-string/m-p/425395#M158453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are lots of ways that probably all won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left(Customer,4) will return 'Sony'. But this always picks the first 4 characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(left(Customer,4)='Sony','Sony',Customer) will only change Customers that start with Sony to 'Sony'. But it will leave other (duplicate) Customers alone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield(Customer,' ',1) as Customer will return the string before the first space. If you have Customers with a space in their regular name this won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left(Customer,index(Customer,' ',-1)-1) wil return everything before the last space. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all that doesn't work you can try using &lt;A _jive_internal="true" href="https://community.qlik.com/message/188895#188895"&gt;wildcard mapping&lt;/A&gt;. But for that you have to identify the duplicates anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you need to buy a data cleansing tool. Such tools are created to do things like this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 07:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-single-string/m-p/425395#M158453</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-04T07:24:38Z</dc:date>
    </item>
  </channel>
</rss>

