<?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 converting String to Integer error - tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/converting-String-to-Integer-error-tmap/m-p/2211873#M9721</link>
    <description>Hi, 
&lt;BR /&gt;I am stuck with this error and unable to figure out what's wrong the expression, I am converting a string value to integer based on the condition, below is the expression I have added in the tMap 
&lt;BR /&gt;(StringHandling.TRIM(Source.SR_Current_SA_Number.toString()) == "Not Available")?Integer.parseInt("0".toString()):Integer.parseInt(StringHandling.TRIM(Source.SR_Current_SA_Number.toString())) 
&lt;BR /&gt; 
&lt;BR /&gt;Error exception : 
&lt;BR /&gt;Exception in component tMap_1 
&lt;BR /&gt;java.lang.NumberFormatException: For input string: "Not Available" 
&lt;BR /&gt; at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) 
&lt;BR /&gt; at java.lang.Integer.parseInt(Integer.java:449) 
&lt;BR /&gt; at java.lang.Integer.valueOf(Integer.java:554) 
&lt;BR /&gt; at nexus.import_closed_cases_0_1.Import_Closed_Cases.tOracleInput_1Process(Import_Closed_Cases.java:2379) 
&lt;BR /&gt; at nexus.import_closed_cases_0_1.Import_Closed_Cases.runJobInTOS(Import_Closed_Cases.java:3076) 
&lt;BR /&gt; at nexus.import_closed_cases_0_1.Import_Closed_Cases.main(Import_Closed_Cases.java:2947) 
&lt;BR /&gt;------- 
&lt;BR /&gt;Any help wil be much appreciated. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Naran</description>
    <pubDate>Sat, 16 Nov 2024 12:59:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T12:59:10Z</dc:date>
    <item>
      <title>converting String to Integer error - tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/converting-String-to-Integer-error-tmap/m-p/2211873#M9721</link>
      <description>Hi, 
&lt;BR /&gt;I am stuck with this error and unable to figure out what's wrong the expression, I am converting a string value to integer based on the condition, below is the expression I have added in the tMap 
&lt;BR /&gt;(StringHandling.TRIM(Source.SR_Current_SA_Number.toString()) == "Not Available")?Integer.parseInt("0".toString()):Integer.parseInt(StringHandling.TRIM(Source.SR_Current_SA_Number.toString())) 
&lt;BR /&gt; 
&lt;BR /&gt;Error exception : 
&lt;BR /&gt;Exception in component tMap_1 
&lt;BR /&gt;java.lang.NumberFormatException: For input string: "Not Available" 
&lt;BR /&gt; at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) 
&lt;BR /&gt; at java.lang.Integer.parseInt(Integer.java:449) 
&lt;BR /&gt; at java.lang.Integer.valueOf(Integer.java:554) 
&lt;BR /&gt; at nexus.import_closed_cases_0_1.Import_Closed_Cases.tOracleInput_1Process(Import_Closed_Cases.java:2379) 
&lt;BR /&gt; at nexus.import_closed_cases_0_1.Import_Closed_Cases.runJobInTOS(Import_Closed_Cases.java:3076) 
&lt;BR /&gt; at nexus.import_closed_cases_0_1.Import_Closed_Cases.main(Import_Closed_Cases.java:2947) 
&lt;BR /&gt;------- 
&lt;BR /&gt;Any help wil be much appreciated. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Naran</description>
      <pubDate>Sat, 16 Nov 2024 12:59:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/converting-String-to-Integer-error-tmap/m-p/2211873#M9721</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: converting String to Integer error - tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/converting-String-to-Integer-error-tmap/m-p/2211874#M9722</link>
      <description>Hi 
&lt;BR /&gt;In Java, to determine whether two strings are equal should use string1.equals("string2"), try this expression: 
&lt;BR /&gt;(StringHandling.TRIM(Source.SR_Current_SA_Number.toString()) .equals("Not Available"))?Integer.parseInt("0".toString()):Integer.parseInt(StringHandling.TRIM(Source.SR_Current_SA_Number.toString())) 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 12 Apr 2011 07:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/converting-String-to-Integer-error-tmap/m-p/2211874#M9722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-12T07:37:48Z</dc:date>
    </item>
  </channel>
</rss>

