<?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 How to remove trailing spaces only in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-remove-trailing-spaces-only/m-p/2374900#M137422</link>
    <description>&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue I'm struggling with to remove only trailing spaces from two strings.  I have two columns which may or may not contain data.  Where there is data in either column, it may or may not have trailing spaces, leading spaces or both.  What I want to do is to remove only the trailing spaces (keeping the leading spaces) and concatenate the two columns.  So for example, my source data might look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLUMN1                                                                        COLUMN2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'First Bank    '                                                                    ' Ltd   '&lt;/P&gt;&lt;P&gt;'Second Bank         '&lt;/P&gt;&lt;P&gt;'Third Bank'                                                                       'Ltd   '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just need to remove the trailing spaces.  If I remove them all, the result of the concatenation on the first row would be&lt;/P&gt;&lt;P&gt;'First BankLtd'&lt;/P&gt;&lt;P&gt;Whereas it should be&lt;/P&gt;&lt;P&gt;'First Bank Ltd' (keeping the leading space in column2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about removing all leading and trailing, then adding a space back in between the concatenated values, but if there's no value in column2 that essentially leaves me with a trailing space on column1!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do?  Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 01:40:45 GMT</pubDate>
    <dc:creator>JM39</dc:creator>
    <dc:date>2024-11-16T01:40:45Z</dc:date>
    <item>
      <title>How to remove trailing spaces only</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-remove-trailing-spaces-only/m-p/2374900#M137422</link>
      <description>&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue I'm struggling with to remove only trailing spaces from two strings.  I have two columns which may or may not contain data.  Where there is data in either column, it may or may not have trailing spaces, leading spaces or both.  What I want to do is to remove only the trailing spaces (keeping the leading spaces) and concatenate the two columns.  So for example, my source data might look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLUMN1                                                                        COLUMN2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'First Bank    '                                                                    ' Ltd   '&lt;/P&gt;&lt;P&gt;'Second Bank         '&lt;/P&gt;&lt;P&gt;'Third Bank'                                                                       'Ltd   '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just need to remove the trailing spaces.  If I remove them all, the result of the concatenation on the first row would be&lt;/P&gt;&lt;P&gt;'First BankLtd'&lt;/P&gt;&lt;P&gt;Whereas it should be&lt;/P&gt;&lt;P&gt;'First Bank Ltd' (keeping the leading space in column2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about removing all leading and trailing, then adding a space back in between the concatenated values, but if there's no value in column2 that essentially leaves me with a trailing space on column1!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do?  Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-remove-trailing-spaces-only/m-p/2374900#M137422</guid>
      <dc:creator>JM39</dc:creator>
      <dc:date>2024-11-16T01:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove trailing spaces only</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-remove-trailing-spaces-only/m-p/2374901#M137423</link>
      <description>&lt;P&gt;So I thought I'd come up with a solution with this:&lt;/P&gt;&lt;P&gt;row2.Column2==null ?&lt;/P&gt;&lt;P&gt;row2.Column1 :&lt;/P&gt;&lt;P&gt;row2.Column1+" "+row2.Column2&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I think I'm saying that if column2 is null then use the value in column1, else concatenate column1 &amp;amp; column2, separated by a space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the advanced settings in the source file, I also checked column1 &amp;amp; column2 to trim.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it seems to be ignoring the first condition row2.Column2==null ?&lt;/P&gt;&lt;P&gt;So where I've got null values in column2 it's using the value from column1, but I've ended up with a trailing space as if it's concatenated column1 &amp;amp; 2 with a space in between.&lt;/P&gt;&lt;P&gt;I'm wondering if it's not actually null values in column2, but when I look at the delimited source file, there's definitely no spaces or anything else in that column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 11:44:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-remove-trailing-spaces-only/m-p/2374901#M137423</guid>
      <dc:creator>JM39</dc:creator>
      <dc:date>2020-08-13T11:44:57Z</dc:date>
    </item>
  </channel>
</rss>

