<?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: How to implement multiple case statement in Tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277321#M53136</link>
    <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TalendSolution_4.JPG" style="width: 792px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M22H.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138424i2C472752745B365F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M22H.jpg" alt="0683p000009M22H.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;It works . Please try. you will get your expected result.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 20:42:41 GMT</pubDate>
    <dc:creator>akumar2301</dc:creator>
    <dc:date>2019-01-16T20:42:41Z</dc:date>
    <item>
      <title>How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277312#M53127</link>
      <description>&lt;P&gt;Talend Gurus,&lt;/P&gt;&lt;P&gt;can anyone let me know how to handle multiple case statement in Tmap?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nvl(CASE WHEN regexp_instr(F1,'/|,| ') = 0 THEN&lt;BR /&gt;REPLACE(F1,' ')&lt;BR /&gt;ELSE substr(F1,1,regexp_instr(F1,'/|,| ')-1)&lt;BR /&gt;END&lt;BR /&gt;,F1)&lt;BR /&gt;as X1,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;CASE WHEN regexp_instr(&lt;SPAN&gt;F1,'/|,| '&lt;/SPAN&gt;) = 0 THEN NULL ELSE&lt;BR /&gt;REGEXP_REPLACE(SUBSTR(F1, regexp_instr(&lt;SPAN&gt;F1,'/|,| '&lt;/SPAN&gt;)),'/|,|')&lt;BR /&gt;END AS X2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(CASE WHEN INSTR (F1,'@',1,2) = 0&lt;BR /&gt;OR F1 LIKE '%&amp;lt;%' OR F1 LIKE '%&amp;gt;%' OR UPPER(F1) LIKE '%IN%' OR LENGTH(F1) &amp;gt;= 10&lt;BR /&gt;THEN 'Y' ELSE 'N' END) AS Y,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(CASE WHEN INSTR (F1,'@',1,2) = 0 THEN 'A'&lt;BR /&gt;WHEN F1 LIKE '%&amp;lt;%' OR F1 LIKE '%&amp;gt;%' THEN 'C'&lt;BR /&gt;WHEN UPPER(F1) LIKE '%IN%' THEN 'CI'&lt;BR /&gt;WHEN LENGTH(F1) &amp;gt;= 10 THEN 'L'&lt;BR /&gt;END) AS Z&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 16:13:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277312#M53127</guid>
      <dc:creator>AAA999</dc:creator>
      <dc:date>2019-01-08T16:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277313#M53128</link>
      <description>&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCjx1CAC#M85008" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/Using-local-variable-in-tmap-expression-builder/m-p/136652#M85008&lt;/A&gt;</description>
      <pubDate>Tue, 08 Jan 2019 16:19:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277313#M53128</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-01-08T16:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277314#M53129</link>
      <description>I have multiple substr and instr also in my case statement. I wrote the code in oracle, how to write in talend</description>
      <pubDate>Tue, 08 Jan 2019 16:28:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277314#M53129</guid>
      <dc:creator>AAA999</dc:creator>
      <dc:date>2019-01-08T16:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277315#M53130</link>
      <description>&lt;P&gt;&lt;A href="https://help.talend.com/reader/VXLHZvns6nwhPGeQbm1Iig/2PD0dBEfYwKBhZpu3o4vMA" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/VXLHZvns6nwhPGeQbm1Iig/2PD0dBEfYwKBhZpu3o4vMA&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;also StringHandling routine has function for instr and substr&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 16:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277315#M53130</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-01-08T16:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277316#M53131</link>
      <description>&lt;P&gt;Gurus,&lt;/P&gt;&lt;P&gt;Can anyone let me know what is the function in talend for comparing 2 dates?&lt;/P&gt;&lt;P&gt;greatest (dt1, nvl(dt2,dt1)) as date.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 18:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277316#M53131</guid>
      <dc:creator>AAA999</dc:creator>
      <dc:date>2019-01-10T18:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277317#M53132</link>
      <description>&lt;P&gt;Still not resolved. is there any function available rather than writing a routine for this solution?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 14:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277317#M53132</guid>
      <dc:creator>AAA999</dc:creator>
      <dc:date>2019-01-14T14:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277318#M53133</link>
      <description>Can you please write your user story ? It’s complicated to read sql&lt;BR /&gt;statements.&lt;BR /&gt;&lt;BR /&gt;Which functionality you are not able to achieve w/o user defined routines ?&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jan 2019 17:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277318#M53133</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-01-14T17:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277319#M53134</link>
      <description>I am trying to achieve this using tmap. I have multiple case statement with substring, instring, regular expressions(Regexp_Instr, regexp_replace, Rexexp_like) inside the case statement. I couldn't find a function that can be used to achieved using the rule defined. I am not sure why one needs to write a routine to achieve it.
&lt;BR /&gt;
&lt;BR /&gt;If the source data has delimiters like ,'/|,| -' then replace it with space.
&lt;BR /&gt;and capture the value before the space
&lt;BR /&gt;tom ; tim
&lt;BR /&gt;john , jack
&lt;BR /&gt;jill/// john
&lt;BR /&gt;sandy - june
&lt;BR /&gt;linda
&lt;BR /&gt;
&lt;BR /&gt;result
&lt;BR /&gt;tom
&lt;BR /&gt;john
&lt;BR /&gt;jill
&lt;BR /&gt;sandy
&lt;BR /&gt;linda
&lt;BR /&gt;
&lt;BR /&gt;nvl(CASE WHEN regexp_instr(F1,'/|,| ') = 0 THEN REPLACE(F1,' ')
&lt;BR /&gt;ELSE substr(F1,1,regexp_instr(F1,'/|,| ')-1)
&lt;BR /&gt;END
&lt;BR /&gt;,F1)
&lt;BR /&gt;CASE WHEN regexp_instr(F1,'/|,| ') = 0 THEN NULL ELSE
&lt;BR /&gt;REGEXP_REPLACE(SUBSTR(F1, regexp_instr(F1,'/|,| ')),'/|,|')
&lt;BR /&gt;END AS X2,</description>
      <pubDate>Mon, 14 Jan 2019 18:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277319#M53134</guid>
      <dc:creator>AAA999</dc:creator>
      <dc:date>2019-01-14T18:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277320#M53135</link>
      <description>it should quite easy to do this with tExtractRegexField component .&lt;BR /&gt;&lt;BR /&gt;Try with regex "([a-zA-Z]+)(.*)"&lt;BR /&gt;&lt;BR /&gt;it should give you 1st field.</description>
      <pubDate>Mon, 14 Jan 2019 20:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277320#M53135</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-01-14T20:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277321#M53136</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TalendSolution_4.JPG" style="width: 792px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M22H.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138424i2C472752745B365F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M22H.jpg" alt="0683p000009M22H.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;It works . Please try. you will get your expected result.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 20:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277321#M53136</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-01-16T20:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277322#M53137</link>
      <description>did this help?</description>
      <pubDate>Mon, 21 Jan 2019 17:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277322#M53137</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-01-21T17:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277323#M53138</link>
      <description>not resolved</description>
      <pubDate>Tue, 22 Jan 2019 20:33:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277323#M53138</guid>
      <dc:creator>AAA999</dc:creator>
      <dc:date>2019-01-22T20:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement multiple case statement in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277324#M53139</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069LYJAA2"&gt;@AAA999&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;As per your scenario, i have a query though will the delimiter option be the same, will it always consist of ", or / or ; etc"???&lt;/P&gt; 
&lt;P&gt;One solution what you can implement as per your sample data is -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;you can create a variable in tmap and give the logic as if the row consists any of the specified delimiter then it will give the specified result.(if you dont want to use user-defined routines)&lt;/P&gt; 
&lt;P&gt;else you can go with&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LP7CAAW"&gt;@uganesh&lt;/A&gt;&amp;nbsp;'s solution of textractregexfield or you can try textractdelimitedfields.&lt;/P&gt; 
&lt;P&gt;Logic -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;row1.column1.consists(";")?TalendStringHandling.Left(row1.column1,TalendStringHandling.indexof(";"))&lt;/P&gt; 
&lt;P&gt;:row1.column1.consists("/")?TalendStringHandling.Left(row1.column1,TalendStringHandling.indexof("/"))&lt;/P&gt; 
&lt;P&gt;:etc.&lt;/P&gt; 
&lt;P&gt;You can use substring function as well, if you dont want to use in-build Stringhandling functions.&lt;/P&gt; 
&lt;P&gt;Pls do share your job designs and results if you have any issues.&lt;/P&gt; 
&lt;P&gt;Pls get back to Community, if necessary.&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;Ankit.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 06:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-implement-multiple-case-statement-in-Tmap/m-p/2277324#M53139</guid>
      <dc:creator>ankit7359</dc:creator>
      <dc:date>2019-01-23T06:59:38Z</dc:date>
    </item>
  </channel>
</rss>

