<?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: Problem in searching a substring within a String in Data Quality</title>
    <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279515#M3453</link>
    <description>&lt;A href="https://community.qlik.com/s/profile/005700000036lIsAAI"&gt;@iburtally&lt;/A&gt; , thanks for your suggestion but i think you have misunderstood the scenario. 
&lt;BR /&gt; 
&lt;BR /&gt;Customer ID : 21AD210001, 10001 are two separate rows not one. 
&lt;BR /&gt; 
&lt;BR /&gt;So there is no point in removing everything after ",". 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
    <pubDate>Tue, 22 Aug 2017 14:06:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-22T14:06:49Z</dc:date>
    <item>
      <title>Problem in searching a substring within a String</title>
      <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279513#M3451</link>
      <description>&lt;P&gt;Dear All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a scenario where i have to search for customer ID in the Description column of Bank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two input files: &lt;STRONG&gt;Bank&lt;/STRONG&gt; and &lt;STRONG&gt;Customer_master.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Bank description has data something like this :&amp;nbsp;&lt;STRONG&gt;WP/JULY/11D2135E/Interest/Kelie&amp;nbsp;&lt;/STRONG&gt;where&amp;nbsp;&lt;STRONG&gt;11D2135E&amp;nbsp;&lt;/STRONG&gt;is the customerID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using following method:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Bank.Description.contains(Customer_master.ACCOUNT_NUMBER)&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However it is giving me correct results but it is failing in some particular&amp;nbsp;scenarios like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Customer ID&lt;/STRONG&gt; : &lt;STRONG&gt;21AD210001&lt;/STRONG&gt;, &lt;STRONG&gt;10001&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Bank Description&lt;/STRONG&gt;:&amp;nbsp;&lt;STRONG&gt;WP/AUG/SAL/&lt;/STRONG&gt;&lt;STRONG&gt;21AD210001/WASA&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;in this case it should only match with &lt;STRONG&gt;21AD210001&amp;nbsp;&lt;/STRONG&gt;but it is also matching with &lt;STRONG&gt;10001&lt;/STRONG&gt; which is incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to overcome with this issue?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 12:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279513#M3451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T12:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in searching a substring within a String</title>
      <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279514#M3452</link>
      <description>&lt;P&gt;Well, you should truncate your Customer ID and remove everything after the , &amp;nbsp;first. &amp;nbsp;That should be a preprocessing on the file before you do the search.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You should do a&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Bank.Description.contains(Customer_master.ACCOUNT_NUMBER.indexOf(',') &amp;gt; 0 ? (Customer_master.ACCOUNT_NUMBER.substring(0, &lt;/STRONG&gt;&lt;STRONG&gt;Customer_master.ACCOUNT_NUMBER.indexOf(',')) :&amp;nbsp;Customer_master.ACCOUNT_NUMBER))&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;This assumes all values are not null. &amp;nbsp;If they are null, you should add proper check for null&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 03:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279514#M3452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-21T03:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in searching a substring within a String</title>
      <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279515#M3453</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/005700000036lIsAAI"&gt;@iburtally&lt;/A&gt; , thanks for your suggestion but i think you have misunderstood the scenario. 
&lt;BR /&gt; 
&lt;BR /&gt;Customer ID : 21AD210001, 10001 are two separate rows not one. 
&lt;BR /&gt; 
&lt;BR /&gt;So there is no point in removing everything after ",". 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Aug 2017 14:06:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279515#M3453</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-22T14:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in searching a substring within a String</title>
      <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279516#M3454</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scenario still not too clear for me..&lt;/P&gt;&lt;P&gt;based on your description, it seams you need "top 1" of the matches... is it?&lt;/P&gt;&lt;P&gt;if it is, a possible solution i found is use&amp;nbsp;tAggregrateRow (see capture1.jpg)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Muzio&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LrCk"&gt;Capture.JPG&lt;/A&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:08:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279516#M3454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-30T16:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in searching a substring within a String</title>
      <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279517#M3455</link>
      <description>&lt;P&gt;I am not sure I understand it properly. &amp;nbsp;Please provide files sample and your sample job.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 13:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279517#M3455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-09T13:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in searching a substring within a String</title>
      <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279518#M3456</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why are you using a "contains" function ? If it is an exact String that you are looking for, I think you should rather use an "equals" function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 13:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279518#M3456</guid>
      <dc:creator>dprot</dc:creator>
      <dc:date>2017-09-09T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in searching a substring within a String</title>
      <link>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279519#M3457</link>
      <description>&lt;P&gt;Hello...&lt;/P&gt; 
&lt;P&gt;I think I've&amp;nbsp;finally understand the scenario..&lt;/P&gt; 
&lt;P&gt;Please don't care about my previous suggestion. The right think to do is NOT to filter "TOP 1" of the&amp;nbsp;rows.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Easiest solution should be:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Bank.Description.contains("/" + Customer_master.ACCOUNT_NUMBER + "/")&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Anyway&amp;nbsp;it could result in a wrong match....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;ex:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Customer ID&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;21AD210001&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;10001&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Bank Description&lt;/STRONG&gt;:&amp;nbsp;&lt;STRONG&gt;WP/AUG&lt;FONT size="5"&gt;/10001/&lt;/FONT&gt;&lt;/STRONG&gt;&lt;STRONG&gt;21AD210001/WASA&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;This case will result in 2&amp;nbsp;rows&amp;nbsp;even if you expect only one.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Other solution could be to &amp;nbsp;arrange Bank description in a fully defined structure splitted by&amp;nbsp;"/" (using tExtractDelimitedFileds&amp;nbsp;component)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;This will&amp;nbsp;allow you to add some more fields in the main structure:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Bank.Description&lt;/STRONG&gt;:&amp;nbsp;&lt;STRONG&gt;WP/AUG&lt;FONT size="5"&gt;/10001/&lt;/FONT&gt;&lt;/STRONG&gt;&lt;STRONG&gt;21AD210001/WASA&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Bank.Des1:&amp;nbsp;WP&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Bank.Des2: AUG&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Bank.Des3: 10001&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Bank.CusId: 21AD210001&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Bank.Des5: WASA&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;than use tmap to join main flow (Banks structure) with lookup &amp;nbsp;flow (Customers) joining&amp;nbsp;&lt;STRONG&gt;Customer_master.ACCOUNT_NUMBER &lt;/STRONG&gt;with&amp;nbsp;&lt;STRONG&gt;Bank.CusId&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Hope this may help you&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Muzio&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 09:24:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Problem-in-searching-a-substring-within-a-String/m-p/2279519#M3457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T09:24:48Z</dc:date>
    </item>
  </channel>
</rss>

