<?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 string compare in tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221934#M15733</link>
    <description>&lt;P&gt;Hi Talend experts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having difficulty comparing string. When I use following expression it doesnt seem to be working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Relational.ISNULL(Stg_Unit_enrol.Unit_enrolment_code) || Stg_Unit_enrol.Deleted_Flag.equals(&lt;SPAN class="s1"&gt;"Y"&lt;/SPAN&gt;) ? context.NotAvailableCode : Stg_Unit_enrol.Unit_enrolment_code&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Ideally when my deleted_flag='Y' then it should show -2 value but somehow it is not showing.&lt;/P&gt;
&lt;P class="p1"&gt;Just for info. deleted_flag contains null values too.&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Is there anything I am doing wrong here?&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Thanks&lt;/P&gt;
&lt;P class="p1"&gt;Harshal.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 07:34:25 GMT</pubDate>
    <dc:creator>Parikhharshal</dc:creator>
    <dc:date>2024-11-16T07:34:25Z</dc:date>
    <item>
      <title>string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221934#M15733</link>
      <description>&lt;P&gt;Hi Talend experts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having difficulty comparing string. When I use following expression it doesnt seem to be working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Relational.ISNULL(Stg_Unit_enrol.Unit_enrolment_code) || Stg_Unit_enrol.Deleted_Flag.equals(&lt;SPAN class="s1"&gt;"Y"&lt;/SPAN&gt;) ? context.NotAvailableCode : Stg_Unit_enrol.Unit_enrolment_code&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Ideally when my deleted_flag='Y' then it should show -2 value but somehow it is not showing.&lt;/P&gt;
&lt;P class="p1"&gt;Just for info. deleted_flag contains null values too.&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Is there anything I am doing wrong here?&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Thanks&lt;/P&gt;
&lt;P class="p1"&gt;Harshal.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:34:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221934#M15733</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2024-11-16T07:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221935#M15734</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000006yrG6AAI"&gt;@Parikhharshal&lt;/A&gt;,i am assuming that your comparing sting field and the output field also sting right? that should work and check below one also working.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Stg_Unit_enrol.Unit_enrolment_code==null || Stg_Unit_enrol.Deleted_Flag.equals(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;"Y"&lt;/SPAN&gt;&lt;SPAN&gt;) ? context.NotAvailableCode : Stg_Unit_enrol.Unit_enrolment_code&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 05:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221935#M15734</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-09-27T05:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221936#M15735</link>
      <description>&lt;P&gt;You did not mention what data type is&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Stg_Unit_enrol.Deleted_Flag.&amp;nbsp; If it is String code the equals as:&amp;nbsp;&amp;nbsp;&amp;nbsp;Stg_Unit_enrol.Deleted_Flag.equals("Y") and if it is char code the equals as:&amp;nbsp;&amp;nbsp;&amp;nbsp;Stg_Unit_enrol.Deleted_Flag.equals('Y').&amp;nbsp; Notice the use of single quote for char type and a double quote for String type.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 06:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221936#M15735</guid>
      <dc:creator>skorp</dc:creator>
      <dc:date>2018-09-27T06:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221937#M15736</link>
      <description>It is string.</description>
      <pubDate>Thu, 27 Sep 2018 06:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221937#M15736</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2018-09-27T06:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221938#M15737</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000006yrG6AAI"&gt;@Parikhharshal&lt;/A&gt;,then try with below one?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Stg_Unit_enrol.Unit_enrolment_code==null || Stg_Unit_enrol.Deleted_Flag.equals(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;"Y"&lt;/SPAN&gt;&lt;SPAN&gt;) ? context.NotAvailableCode : Stg_Unit_enrol.Unit_enrolment_code&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 07:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221938#M15737</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-09-27T07:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221939#M15738</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000006yrG6AAI"&gt;@Parikhharshal&lt;/A&gt;,still do you have issue the expression?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 07:40:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221939#M15738</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-09-27T07:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221940#M15739</link>
      <description>&lt;P&gt;An improvement to your expression, you should fail at null check because comparing a null with a string will cause an exception.&amp;nbsp; The expression would be:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;!Stg_Unit_enrol.Unit_enrolment_code==null &amp;amp;&amp;amp; Stg_Unit_enrol.Deleted_Flag.equals(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;"Y"&lt;/SPAN&gt;&lt;SPAN&gt;) ? context.NotAvailableCode : Stg_Unit_enrol.Unit_enrolment_code&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;alternative syntax...&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Stg_Unit_enrol.Unit_enrolment_code!=null &amp;amp;&amp;amp; Stg_Unit_enrol.Deleted_Flag.equals(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;"Y"&lt;/SPAN&gt;&lt;SPAN&gt;) ? context.NotAvailableCode : Stg_Unit_enrol.Unit_enrolment_code&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Which reads "if the&amp;nbsp;Stg_Unit_enrol.Unit_enrolment_code is not null, then go on to the next testing for its Y value".&amp;nbsp; So, you don't fall into the trap of testing a string against a null value.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221940#M15739</guid>
      <dc:creator>skorp</dc:creator>
      <dc:date>2018-09-27T14:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221941#M15740</link>
      <description>&lt;P&gt;Or just:&lt;/P&gt;
&lt;PRE&gt;"Y".equals(Stg_Unit_enrol.Deleted_Flag.equals) ? context.NotAvailableCode : Stg_Unit_enrol.Unit_enrolment_code&lt;/PRE&gt;
&lt;P&gt;As soon as "Y" cannot be null, you are still protected against NPE.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:30:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221941#M15740</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-09-27T14:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: string compare in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221942#M15741</link>
      <description>Thanks a lot for your reply TRF.</description>
      <pubDate>Wed, 03 Oct 2018 23:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-compare-in-tmap/m-p/2221942#M15741</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2018-10-03T23:19:45Z</dc:date>
    </item>
  </channel>
</rss>

