<?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 big decimal in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292715#M65763</link>
    <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;Use org.apache.commons.lang3.StringUtils.stripStart("00016546M", "0") will strip the start character "0",  and use tReplaceList will replace the letter with equivalent number.  &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Sep 2020 09:36:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-09-16T09:36:28Z</dc:date>
    <item>
      <title>Convert string to big decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292714#M65762</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data like  00016546M,00000203Q.&lt;/P&gt;&lt;P&gt;Where the last digit alphabet represents:&lt;/P&gt;&lt;P&gt;M:  -1&lt;/P&gt;&lt;P&gt;N:  -2&lt;/P&gt;&lt;P&gt;O:  -3&lt;/P&gt;&lt;P&gt;P :  -4&lt;/P&gt;&lt;P&gt;Q:  -5&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My o/p should be convert the last digit to the equivalent number but the minus "-" sign should be at the beginning. and then divide by 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg if  i/p is 00000200P  THEN o/p should be   -20.07.&lt;/P&gt;&lt;P&gt;How can i achieve this in tmap?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:27:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292714#M65762</guid>
      <dc:creator>NNayal1600240775</dc:creator>
      <dc:date>2024-11-16T01:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to big decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292715#M65763</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;Use org.apache.commons.lang3.StringUtils.stripStart("00016546M", "0") will strip the start character "0",  and use tReplaceList will replace the letter with equivalent number.  &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 09:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292715#M65763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T09:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to big decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292716#M65764</link>
      <description>&lt;P&gt;Hi Shong through query I am able to achieve the result.&lt;/P&gt;&lt;P&gt;Below is the query for 1 sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT CASE WHEN '000015O' LIKE '%O' THEN CONCAT('-',SUBSTRING('000015O',1,(regexp_instr('000015O','O'))-1) ,'3')/100&amp;nbsp;&amp;nbsp;END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to convert this query in tmap. Could you please help &lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 09:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292716#M65764</guid>
      <dc:creator>NNayal1600240775</dc:creator>
      <dc:date>2020-09-16T09:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to big decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292717#M65765</link>
      <description>&lt;P&gt;On tMap, use expression:&lt;/P&gt;&lt;P&gt;"-"+org.apache.commons.lang3.StringUtils.stripStart(row1.value, "0")&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before tMap, you need to use tReplaceList to replace the letter with equivalent number.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 06:44:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292717#M65765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-17T06:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to big decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292718#M65766</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.talend.com/s/profile/0053p000006AJHcAAO" alt="https://community.talend.com/s/profile/0053p000006AJHcAAO" target="_blank"&gt;NNayal1600240775&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please follow below approach, make necessary changes as per your requirement&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009oSisAAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138470i548AA39B8E6DAB11/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009oSisAAE.png" alt="0693p000009oSisAAE.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009oSj2AAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127882i72D1340DA31BDE50/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009oSj2AAE.png" alt="0693p000009oSj2AAE.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;in tmap:&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009oSjCAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144417iE0AC52DB2E122C6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009oSjCAAU.png" alt="0693p000009oSjCAAU.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;converted string to decimal&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009oSjHAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146160iF4B2B96CE7F45D53/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009oSjHAAU.png" alt="0693p000009oSjHAAU.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in next tmap&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009oSjMAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150934i6989BD23A635AEDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009oSjMAAU.png" alt="0693p000009oSjMAAU.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Output:&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009oSjRAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132607i01BDA878D7F8BF1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009oSjRAAU.png" alt="0693p000009oSjRAAU.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 06:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292718#M65766</guid>
      <dc:creator>vikramk</dc:creator>
      <dc:date>2020-09-17T06:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to big decimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292719#M65767</link>
      <description>&lt;P&gt;Vikram the approach you discussed looks good to me.&lt;/P&gt;&lt;P&gt;But this approach has 3 steps in between , to avoide that I loaded everything as string in a temporary table in snowflake then wrote sql query :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CASE&amp;nbsp;&lt;/P&gt;&lt;P&gt;WHEN COLUMN_NAME LIKE '%J' THEN CAST(CONCAT('-',SUBSTRING(COLUMN_NAME,1,(regexp_instr(COLUMN_NAME,'J'))-1),'1')&amp;nbsp;AS INTEGER)/100&lt;/P&gt;&lt;P&gt;WHEN COLUMN_NAME LIKE '%K' THEN CAST(CONCAT('-',SUBSTRING(COLUMN_NAME,1,(regexp_instr(COLUMN_NAME,'K'))-1),'2')&amp;nbsp;AS INTEGER)/100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sending me this approach in tmap. I will try this out.&lt;/P&gt;&lt;P&gt;Thanks for the help. Really appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 07:42:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-string-to-big-decimal/m-p/2292719#M65767</guid>
      <dc:creator>NNayal1600240775</dc:creator>
      <dc:date>2020-09-17T07:42:27Z</dc:date>
    </item>
  </channel>
</rss>

