<?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: Convert String to Int with a condition in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351708#M118300</link>
    <description>&lt;P&gt;@Ivan R​&amp;nbsp;, You need to use below way in tmap or tjavarow after reading data .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row1.CLICKS.equals("Yes") ? 1 : 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2021 10:43:43 GMT</pubDate>
    <dc:creator>manodwhb</dc:creator>
    <dc:date>2021-06-30T10:43:43Z</dc:date>
    <item>
      <title>Convert String to Int with a condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351707#M118299</link>
      <description>&lt;P&gt;Hello, I have a column said CLICKS (String) that might says "Yes" and other that are all null.&lt;/P&gt;&lt;P&gt;"Yes" values means 1&lt;/P&gt;&lt;P&gt;Null values means 0&lt;/P&gt;&lt;P&gt;&lt;B&gt;EXAMPLE:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;CLICKS&lt;/P&gt;&lt;P&gt;1 Yes&lt;/P&gt;&lt;P&gt;2 Yes&lt;/P&gt;&lt;P&gt;3 Null&lt;/P&gt;&lt;P&gt;4 Null&lt;/P&gt;&lt;P&gt;5 Yes&lt;/P&gt;&lt;P&gt;I need this column in INT with numbers because I want to calculate in a BI software later.&lt;/P&gt;&lt;P&gt;¿How can I convert this "Yes" values into a number 1? I need to convert to int and... -- IF (COLUMN CLICKS) COLUMN CLICKS = 1 --&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:59:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351707#M118299</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2024-11-15T23:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Int with a condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351708#M118300</link>
      <description>&lt;P&gt;@Ivan R​&amp;nbsp;, You need to use below way in tmap or tjavarow after reading data .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row1.CLICKS.equals("Yes") ? 1 : 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 10:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351708#M118300</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2021-06-30T10:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Int with a condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351709#M118301</link>
      <description>&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I put this code in a row in a tMap but I have a "java.lang.NullPointerException" when I send to a SQL Server DB&lt;/P&gt;&lt;P&gt;﻿&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gf8AUAAZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151331iC3F7F71290FC1FFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gf8AUAAZ.png" alt="0695b00000Gf8AUAAZ.png" /&gt;&lt;/span&gt;﻿&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gf8AZAAZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146930i85B4A65AF1E3A748/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gf8AZAAZ.png" alt="0695b00000Gf8AZAAZ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 11:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351709#M118301</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2021-06-30T11:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Int with a condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351710#M118302</link>
      <description>&lt;P&gt;try this expression:&lt;/P&gt;&lt;P&gt;row1.CLICKS==null?0:(row1.CLICKS.equals("Yes") ? 1 : 0)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 11:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351710#M118302</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-30T11:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Int with a condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351711#M118303</link>
      <description>&lt;P&gt;@Ivan R​&amp;nbsp;,Agree with @Shicong Hong​&amp;nbsp;,it should work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 11:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351711#M118303</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2021-06-30T11:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Int with a condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351712#M118304</link>
      <description>&lt;P&gt;Thank You! Works perfectly.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 11:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351712#M118304</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2021-06-30T11:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Int with a condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351713#M118305</link>
      <description>&lt;P&gt;Hi a simpler solution :&lt;/P&gt;&lt;P&gt;("Yes").equals(row1.CLICKS)?1:0;&lt;/P&gt;&lt;P&gt;Send me Love and Kudos&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 12:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Int-with-a-condition/m-p/2351713#M118305</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-06-30T12:06:09Z</dc:date>
    </item>
  </channel>
</rss>

