<?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: [resolved] Talend BigDecimal Divide operation do not work! in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292550#M65617</link>
    <description>Hi Cbehen,
&lt;BR /&gt;The error is due to your first comparison with '0'.&amp;nbsp;
&lt;BR /&gt;You already have converted&amp;nbsp;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;row13.session to Bigdecimal and now comparing with integer 0. Use below code to compare with decimal 0-&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp;row13.session== java.math.BigDecimal("0")&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Hope it works.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Thanks,&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Shruti&lt;/FONT&gt;&lt;/FONT&gt;</description>
    <pubDate>Tue, 27 Oct 2015 12:16:49 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2015-10-27T12:16:49Z</dc:date>
    <item>
      <title>[resolved] Talend BigDecimal Divide operation do not work!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292547#M65614</link>
      <description>I am trying to divide 2 integer values and result must be decimal 
&lt;BR /&gt;For exp : pageview (12) / sessions(5) = pageviewPerSession (2,4) 
&lt;BR /&gt;I am using tConvertType to convert from INT to float or INT to BigDecimal ,&amp;nbsp; 
&lt;BR /&gt;If i use float Talend works fine but I see the result value as "2" at msSQL 
&lt;BR /&gt;If i use BigDecimal at tMap : &amp;nbsp;row13.pageview.divide(row13.session) gives me error (xception in component tMap_4 
&lt;BR /&gt;java.lang.NullPointerException). Also i tried (row13.pageview / row13.session) it says / is undefined. 
&lt;BR /&gt;I prefer BigDecimal because msSQL dataType is decimal(18,4), IF I choose float at msSQL there is no chance to give float(18,4) only float data type and it shows just "2" in my example. 
&lt;BR /&gt;Please help 
&lt;BR /&gt;Best Regards 
&lt;BR /&gt;Cihan 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBLw.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152870i714294D07388B39A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBLw.jpg" alt="0683p000009MBLw.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Sat, 16 Nov 2024 11:05:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292547#M65614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Talend BigDecimal Divide operation do not work!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292548#M65615</link>
      <description>if you divide 2 integer values the result will always be an integer. You must cast at least one value to float and not only the result!&lt;BR /&gt;I suggest also use the type double instead of float!</description>
      <pubDate>Mon, 17 Aug 2015 12:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292548#M65615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-17T12:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Talend BigDecimal Divide operation do not work!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292549#M65616</link>
      <description>Hello I am converting INT to BigDecimal or INT to float at tConvertType before sending the data to the tMap&lt;BR /&gt;Problem here is sum of sessions are sometimes zero so when i try to divide pageviews/sessions gives me nullexception&lt;BR /&gt;This doesn't work : row13.session ==0?"do nothing":row13.pageview.divide(row13.session)&amp;nbsp;&lt;BR /&gt;Error message : Incompatible operand types BigDecimal and int.&lt;BR /&gt;There is no double datatype at msSQL so i am trying to do this division by using BigDecimal.</description>
      <pubDate>Mon, 17 Aug 2015 13:29:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292549#M65616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-17T13:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Talend BigDecimal Divide operation do not work!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292550#M65617</link>
      <description>Hi Cbehen,
&lt;BR /&gt;The error is due to your first comparison with '0'.&amp;nbsp;
&lt;BR /&gt;You already have converted&amp;nbsp;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;row13.session to Bigdecimal and now comparing with integer 0. Use below code to compare with decimal 0-&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp;row13.session== java.math.BigDecimal("0")&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Hope it works.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Thanks,&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Shruti&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 27 Oct 2015 12:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Talend-BigDecimal-Divide-operation-do-not-work/m-p/2292550#M65617</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-10-27T12:16:49Z</dc:date>
    </item>
  </channel>
</rss>

