<?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 [resolved] String index out of range in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305183#M76870</link>
    <description>Hi,&lt;BR /&gt;I am new to talend. I tried to insert the data from source to target. both my source &amp;amp; target are mssql. I used the tmap for mapping between source &amp;amp; target. In the target i need to substring the source values. so i tried the following in the tmap&lt;BR /&gt;column_name.substring(start poisitiion,end position).&lt;BR /&gt;While execution I am getting the below given error.&lt;BR /&gt;Exception in component tMap_1&lt;BR /&gt;java.lang.StringIndexOutOfBoundsException: String index out of range: 24&lt;BR /&gt;	at java.lang.String.substring(Unknown Source)&lt;BR /&gt;	at edw.psp_dim_0_1.PSP_DIM.tMSSqlInput_1Process(PSP_DIM.java:1015)&lt;BR /&gt;	at edw.psp_dim_0_1.PSP_DIM.runJobInTOS(PSP_DIM.java:1463)&lt;BR /&gt;	at edw.psp_dim_0_1.PSP_DIM.main(PSP_DIM.java:1331)&lt;BR /&gt;Kindly suggest. Please find the screenshot of the job design &amp;amp; error</description>
    <pubDate>Tue, 29 May 2012 11:13:19 GMT</pubDate>
    <dc:creator>sivaa_m</dc:creator>
    <dc:date>2012-05-29T11:13:19Z</dc:date>
    <item>
      <title>[resolved] String index out of range</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305183#M76870</link>
      <description>Hi,&lt;BR /&gt;I am new to talend. I tried to insert the data from source to target. both my source &amp;amp; target are mssql. I used the tmap for mapping between source &amp;amp; target. In the target i need to substring the source values. so i tried the following in the tmap&lt;BR /&gt;column_name.substring(start poisitiion,end position).&lt;BR /&gt;While execution I am getting the below given error.&lt;BR /&gt;Exception in component tMap_1&lt;BR /&gt;java.lang.StringIndexOutOfBoundsException: String index out of range: 24&lt;BR /&gt;	at java.lang.String.substring(Unknown Source)&lt;BR /&gt;	at edw.psp_dim_0_1.PSP_DIM.tMSSqlInput_1Process(PSP_DIM.java:1015)&lt;BR /&gt;	at edw.psp_dim_0_1.PSP_DIM.runJobInTOS(PSP_DIM.java:1463)&lt;BR /&gt;	at edw.psp_dim_0_1.PSP_DIM.main(PSP_DIM.java:1331)&lt;BR /&gt;Kindly suggest. Please find the screenshot of the job design &amp;amp; error</description>
      <pubDate>Tue, 29 May 2012 11:13:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305183#M76870</guid>
      <dc:creator>sivaa_m</dc:creator>
      <dc:date>2012-05-29T11:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] String index out of range</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305184#M76871</link>
      <description>Hi,&lt;BR /&gt;It seems one of the input strings isn't the supposed length of 24 positions. substring will return with an exception in this case. You could use the following syntax:&lt;BR /&gt;&lt;PRE&gt;column_name.substring(start poisitiion, Math.min(end position, column_name.length()))&lt;/PRE&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Regards,&lt;BR /&gt;Arno</description>
      <pubDate>Tue, 29 May 2012 11:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305184#M76871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-29T11:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] String index out of range</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305185#M76872</link>
      <description>Hi,&lt;BR /&gt;Thanks for the reply. The issue got resolved.&lt;BR /&gt;Can you explain me the syntax which you have given.&lt;BR /&gt;Thanks&lt;BR /&gt;Siva</description>
      <pubDate>Tue, 29 May 2012 11:55:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305185#M76872</guid>
      <dc:creator>sivaa_m</dc:creator>
      <dc:date>2012-05-29T11:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] String index out of range</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305186#M76873</link>
      <description>Hi,&lt;BR /&gt;Sure, what is does is get the characters starting at "start position" (being 0 in your sample I see) and ending at either the last character of the string, or the character at position "end position" (being 24 in your sample). So for a String with length 20 only 20 character will be captured while for a string with length 30, 24 characters will be captured. &lt;BR /&gt;Hope this helps.&lt;BR /&gt;Regards,&lt;BR /&gt;Arno</description>
      <pubDate>Tue, 29 May 2012 13:21:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-String-index-out-of-range/m-p/2305186#M76873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-29T13:21:15Z</dc:date>
    </item>
  </channel>
</rss>

