<?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: String to Double conversion, null/empty string issue.(Excel/SQLServer) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300473#M72700</link>
    <description>hi ,
&lt;BR /&gt;
&lt;BR /&gt;in tmap expression filter how to check for string column not having null value
&lt;BR /&gt;something like this expression filter :
&lt;BR /&gt;!row1.sp_id.equals("null") , i want only not null values to be passed for output 
&lt;BR /&gt;its not working. how to check not null for string</description>
    <pubDate>Tue, 21 Jan 2014 05:34:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-21T05:34:59Z</dc:date>
    <item>
      <title>String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300466#M72693</link>
      <description>Hello Talend forums, I've run into a bit of an issue that I've been searching Google and these forums for for hours now, and have tried just about everything I've seen with unfinished results. 
&lt;BR /&gt;What I'm attempting to do is to take data from Excel and place it into a SQL Server table. Everything is fine except one column. The SQL Server column it represents needs to be a Double, and is checked Nullable in the tMap, and it's brought in from the Excel file as a String, also checked Nullable in the tMap. Now the issue becomes the data itself, and the fact that I can't really get it correct. In the Excel file, there is a row named "Norm", that contains a percentage as double(45.2838104) and it is very easy to just Double.parseDouble(row1.Norm) and get all of the columns that have values, however when a row has no value for that column it will appear as % in the Excel file. Now I've tried various ways of getting around this, including (row1.Norm == "%" ? null : row1.Norm) and then parsing that as a Double, creating another column in Excel that has an IF statement to turn any "%" into a "" and using that one in Excel instead. 
&lt;BR /&gt;Depending on the change attempt, I will get various errors or complete row skips. For the row skips, the message is in red text and says "For input string: "%"". For the errors, I've had "java.lang.NumberFormatException: For input string: "%"" when I attempt to parse the string as a Double without any code in between, and I've even gotten the empty string error a few times, which I saw the solution for, but could not find the checkbox for "allow empty strings" from another thread. 
&lt;BR /&gt;The job is designed as a tFileInputExcel ---&amp;gt; tMap ---&amp;gt; tMSSqlOutput, The tMap can be all over the board depending on what I try. Unfortunately the Excel data cannot be changed in any way, or else I would have just created some VBA code to change any "%" sign to a deleted cell. 
&lt;BR /&gt;If anyone can help me, I would greatly appreciate it. If you have any questions or specific screenshot requests, I will be happy to post them. 
&lt;BR /&gt;Thank you. 
&lt;BR /&gt;Edit: Sorry, Talend Open Studio for MDM(5.3.1.r104014), Windows 7, Microsoft Office 2007 and MS SqlServer 2008 Express</description>
      <pubDate>Tue, 08 Oct 2013 17:45:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300466#M72693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-08T17:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300467#M72694</link>
      <description>This compare (row1.Norm == "%" ? null : row1.Norm) does not work.&lt;BR /&gt;Please compare Strings with the equals method:&lt;BR /&gt;("%".equals(row1.Norm) ? null : row1.Norm)</description>
      <pubDate>Tue, 08 Oct 2013 20:44:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300467#M72694</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-08T20:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300468#M72695</link>
      <description>Thanks jlolling. 
&lt;BR /&gt;Upon doing as you suggested, I appear to still get the same results with the NullPointerException. Every field is still set to Nullable (the output and input is Double, not double and the box is checked) and it still will not accept it. If you have any other suggestions I would greatly appreciate it.</description>
      <pubDate>Tue, 08 Oct 2013 21:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300468#M72695</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-08T21:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300469#M72696</link>
      <description>I think it should be &lt;BR /&gt;(row1.Norm).contains("%") ? null : row1.Norm&lt;BR /&gt;or&lt;BR /&gt;(row1.Norm).equals("%") ? null : row1.Norm</description>
      <pubDate>Wed, 09 Oct 2013 09:50:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300469#M72696</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-09T09:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300470#M72697</link>
      <description>Relational.ISNULL(row1.Norm)?null 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;row1.Norm).trim().contains("%") ? null : row1.Norm</description>
      <pubDate>Wed, 09 Oct 2013 10:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300470#M72697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-09T10:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300471#M72698</link>
      <description>Unfortunately with both of those, I still get the same NullPointerException. Is anyone aware of some potential options or settings I may have missed?&lt;BR /&gt;I do appreciate the help, though.</description>
      <pubDate>Wed, 09 Oct 2013 13:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300471#M72698</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-09T13:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300472#M72699</link>
      <description>Hi jxb9288,&lt;BR /&gt;Show some screenshots of your job/component? Probably some other column or field is causing this issue.&lt;BR /&gt;G</description>
      <pubDate>Wed, 06 Nov 2013 09:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300472#M72699</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-06T09:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300473#M72700</link>
      <description>hi ,
&lt;BR /&gt;
&lt;BR /&gt;in tmap expression filter how to check for string column not having null value
&lt;BR /&gt;something like this expression filter :
&lt;BR /&gt;!row1.sp_id.equals("null") , i want only not null values to be passed for output 
&lt;BR /&gt;its not working. how to check not null for string</description>
      <pubDate>Tue, 21 Jan 2014 05:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300473#M72700</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-21T05:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300474#M72701</link>
      <description>Hi naranibhanu, 
&lt;BR /&gt;Please try this expression in your tMap
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;row1.sp_id==null ||row1.sp_id.isEmpty())?"Unknown":row1.sp_id&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;let me know if it is OK with you.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Tue, 21 Jan 2014 07:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300474#M72701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-21T07:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: String to Double conversion, null/empty string issue.(Excel/SQLServer)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300475#M72702</link>
      <description>You can use Ralational.ISNULL(row1.sp_id) to check null.</description>
      <pubDate>Wed, 22 Jan 2014 05:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-Double-conversion-null-empty-string-issue-Excel/m-p/2300475#M72702</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-22T05:54:10Z</dc:date>
    </item>
  </channel>
</rss>

