<?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: Don't want to remove trailing spaces in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216255#M53220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all thank you everyone for taking out their valuable time and help me out to solve my problem.&lt;/P&gt;&lt;P&gt;Thanks Tom for giving me an idea to deal it on Oracle level by specifying another column of length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not making that space value column as my UPI in landing, but the UPI in fact in landing is a REC_ID column which is a surrogate key.&lt;/P&gt;&lt;P&gt;UPI for that column has been made in the staging area.&lt;/P&gt;&lt;P&gt;Pardon me if I did something wrong as I am a fresher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved the problem by executing a simple pass through query.&lt;/P&gt;&lt;P&gt;This is how I did it.&lt;/P&gt;&lt;P&gt;Correct me if I am wrong but for now the problem has been solved and if anyone wishes the same to replicate the data from the source to the target as the way it was stored in source then one may follow this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;Trailing spaces in a column at Oracle source end but not coming in target Teradata table.&lt;/P&gt;&lt;P&gt;Solution:&lt;/P&gt;&lt;P&gt;1. Pass through in Oracle, replace space by '$', insert into Teradata target table.&lt;/P&gt;&lt;P&gt;2. Again pass through in Teradata, Write an update query to replace '$' with spaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;connect to oracle(......);&lt;/P&gt;&lt;P&gt;insert into tera.tbl1&lt;/P&gt;&lt;P&gt;select * from connection to oracle&lt;/P&gt;&lt;P&gt;(select col1&lt;/P&gt;&lt;P&gt;, replace(col2,' ','$') as col2&lt;/P&gt;&lt;P&gt;, col3&lt;/P&gt;&lt;P&gt;from schema.tbl2&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;disconnect from oracle;&lt;/P&gt;&lt;P&gt;connect to teradata(.....);&lt;/P&gt;&lt;P&gt;execute( update schema.tbl2&lt;/P&gt;&lt;P&gt;set col2 = oreplace(col2,'$',' ')&lt;/P&gt;&lt;P&gt;)by teradata;&lt;/P&gt;&lt;P&gt;execute(commit);&lt;/P&gt;&lt;P&gt;disconnect from teradata;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 May 2015 18:07:00 GMT</pubDate>
    <dc:creator>Hercules</dc:creator>
    <dc:date>2015-05-18T18:07:00Z</dc:date>
    <item>
      <title>Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216223#M53188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;So I am trying to create a table in Teradata from Oracle using SAS.&lt;/P&gt;&lt;P&gt;When I do that, SAS by default remove the trailing spaces, but I want those spaces.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;If I have a value as 026... (dot representing spaces here)&lt;/P&gt;&lt;P&gt;SAS load them into a Teradata table as : 026&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 May 2015 19:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216223#M53188</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-16T19:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216224#M53189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Specify enough length for that variable , sas will add blanks after it automatically .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;length var $ 20 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 05:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216224#M53189</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-17T05:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216225#M53190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply. Not even that working.&lt;/P&gt;&lt;P&gt;I tried first converting spaces into hashes by using TRANWRD and then replacing # by spaces again.&lt;/P&gt;&lt;P&gt;But when I do that, SAS converts all the non occupied places as spaces whether it was in the column value or not.&lt;/P&gt;&lt;P&gt;Approach I'm using is- Tranwrd(column1,"20"x,"#")&lt;/P&gt;&lt;P&gt;for eg, if the column1 has some values and length as 10 $&lt;/P&gt;&lt;P&gt;(Representing dot as spaces)&lt;/P&gt;&lt;P&gt;COLUMN1&lt;/P&gt;&lt;P&gt;Anant...&lt;/P&gt;&lt;P&gt;Sas.&lt;/P&gt;&lt;P&gt;Oracle&lt;/P&gt;&lt;P&gt;First it converts like-&lt;/P&gt;&lt;P&gt;Anant#####&lt;/P&gt;&lt;P&gt;Sas#######&lt;/P&gt;&lt;P&gt;Oracle####&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it should be like,&lt;/P&gt;&lt;P&gt;Anant###&lt;/P&gt;&lt;P&gt;Sas#&lt;/P&gt;&lt;P&gt;Oracle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 06:32:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216225#M53190</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T06:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216226#M53191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sas will pad the blanks at the end of value until it reach the length of variable.So you will get &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Anant#####&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Sas#######&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Oracle####&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;NOT&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Anant###&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Sas#&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Oracle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 07:11:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216226#M53191</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-17T07:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216227#M53192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm curious to know&amp;nbsp; the significance of the trailing blanks? If you are doing value comparisons you don't normally add trailing blanks if x = '026&amp;nbsp;&amp;nbsp;&amp;nbsp; '.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 07:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216227#M53192</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-05-17T07:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216228#M53193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My target column is a UPI in Teradata.&lt;/P&gt;&lt;P&gt;That's why it is discarding the other value I.e. 026 with blanks.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;As there are two values of 026 and 026 with spaces. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 07:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216228#M53193</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T07:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216229#M53194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then how can I have trailing spaces?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 07:35:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216229#M53194</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T07:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216230#M53195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;load them into a Teradata table ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If it is SQL , specify its length as&lt;/P&gt;&lt;P&gt;select var length=10 ......... from ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it was data step, specify its length as&lt;/P&gt;&lt;P&gt;length var $ 10 ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 07:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216230#M53195</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-17T07:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216231#M53196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the question as it as about SAS-Teradata not only SAS.&amp;nbsp; TD (Teradata) is a RDBMS having his own datatypes a tri-value-logic with nulls and different date-time formats supporting interval according to SQL:2013 whereas SAS is using SQL:99. That are a lot of differences.&lt;/P&gt;&lt;P&gt;Look at the SAS-TD access translation &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67589/HTML/default/viewer.htm#n0v7nh4ylrihtin1te8xl0q3dvzv.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/67589/HTML/default/viewer.htm#n0v7nh4ylrihtin1te8xl0q3dvzv.htm"&gt;SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Sixth Edition&lt;/A&gt;&amp;nbsp; char and varchar from TD to SAS are the same.&amp;nbsp; Going from SAS to TD the default is only CHAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Review the TD varchar definition that one is removing trailing blanks when loading loading data. The active hardware compression for blanks at char fields having spaces could be as effective. &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/Load_and_Unload_Utilities/B035_2411_071A/2411Ch03.026.029.html"&gt;http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/Load_and_Unload_Utilities/B035_2411_071A/2411Ch03.026.029.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Remember TD is a special one. Loading data to TD can have issues, they will not return as errors instead some dedicated tables are created having the erroneous ones.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 08:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216231#M53196</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-05-17T08:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216232#M53197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jaap,&lt;/P&gt;&lt;P&gt;I agree with you, but not only Teradata, even if I am making a data set in SAS, then also the spaces are not coming. Its like SAS is removing trailing spaces by default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 08:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216232#M53197</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T08:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216233#M53198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried that Xia,&lt;/P&gt;&lt;P&gt;That is also not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 09:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216233#M53198</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T09:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216234#M53199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No SAS is not removing the spaces, in contrary spaces are always added to fill it up to full fixed storage length. The fixed-storage like the char in TD.&lt;/P&gt;&lt;P&gt;This behavior is the reason why you need to trim (remove trailing spaces) before you can effective concatenate strings. Fixed=fixed there must be something there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must have some other issue. Describe it better with preferable some code showing that.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 09:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216234#M53199</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-05-17T09:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216235#M53200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just wrote a small data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data;&lt;/P&gt;&lt;P&gt;Col1= 'Anant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ';&lt;/P&gt;&lt;P&gt;Col2= length(col1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I copy paste the value Anant in a notepad, there is no trailing space.&lt;/P&gt;&lt;P&gt;also the length has given me 5 as output.&lt;/P&gt;&lt;P&gt;But it should be 10 (as I've given 5 spaces), right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 09:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216235#M53200</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T09:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216236#M53201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data x;&lt;/P&gt;&lt;P&gt;Col1= 'Anant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ';&lt;/P&gt;&lt;P&gt;Col2= length&lt;STRONG&gt;c&lt;/STRONG&gt;(col1);&lt;/P&gt;&lt;P&gt;put Col2=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 09:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216236#M53201</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-17T09:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216237#M53202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that is OK, but I don't only want to find the length.&lt;/P&gt;&lt;P&gt;my main concern is to read these two as different values.&lt;/P&gt;&lt;P&gt;If you write,&lt;/P&gt;&lt;P&gt;proc SQL;&lt;/P&gt;&lt;P&gt;select distinct col1 from x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the output will be-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col1&lt;/P&gt;&lt;P&gt;Anant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But these are two different values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 09:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216237#M53202</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T09:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216238#M53203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67398/HTML/default/viewer.htm#n0f6jve4kdxnh1n1m7c82fhosgih.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/67398/HTML/default/viewer.htm#n0f6jve4kdxnh1n1m7c82fhosgih.htm"&gt;SAS(R) 9.4 Functions and CALL Routines: Reference, Third Edition&lt;/A&gt; finding the position of the last non-blank is length.&amp;nbsp; There are more functions like the c (character) m (bytes)&lt;/P&gt;&lt;P&gt;The length of missing character&amp;nbsp; all blank is either 0 or 1.&amp;nbsp; That could be a confusing one as is with NULLS. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 09:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216238#M53203</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-05-17T09:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216239#M53204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Jaap, that is helpful.&lt;/P&gt;&lt;P&gt;But what if I want to select distinct values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am using this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc SQL;&lt;/P&gt;&lt;P&gt;select distinct col1 from data1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the output is:&lt;/P&gt;&lt;P&gt;Col1&lt;/P&gt;&lt;P&gt;Anant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which actually should be:&lt;/P&gt;&lt;P&gt;Col1&lt;/P&gt;&lt;P&gt;Anant&lt;/P&gt;&lt;P&gt;Anant...... (Considering dots as spaces)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 10:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216239#M53204</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T10:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216240#M53205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't ask to do that . why not replace the trailing blanks with other blank character like TAB ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if &amp;lt;condition is true&amp;gt;&lt;/STRONG&gt;&amp;nbsp; then&amp;nbsp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;column1=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Tranwrd(column1,"20"x,"09"x)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 11:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216240#M53205</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-17T11:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216241#M53206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I was trying to do.&lt;/P&gt;&lt;P&gt;See my second post.&lt;/P&gt;&lt;P&gt;When I ma trying to replace spaces by # then its is giving me all the hashes.&lt;/P&gt;&lt;P&gt;Like for col1 length 10 (representing dots as spaces)&lt;/P&gt;&lt;P&gt;Col1&lt;/P&gt;&lt;P&gt;Anant...&lt;/P&gt;&lt;P&gt;Sas&lt;/P&gt;&lt;P&gt;Hello..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am using tranwrd then:&lt;/P&gt;&lt;P&gt;Col1&lt;/P&gt;&lt;P&gt;Anant#####&lt;/P&gt;&lt;P&gt;Sas#######&lt;/P&gt;&lt;P&gt;Hello######&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But ideally it should be&lt;/P&gt;&lt;P&gt;Anant ###&lt;/P&gt;&lt;P&gt;Sas&lt;/P&gt;&lt;P&gt;Hello##&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 11:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216241#M53206</guid>
      <dc:creator>Hercules</dc:creator>
      <dc:date>2015-05-17T11:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Don't want to remove trailing spaces</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216242#M53207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need specify a &lt;STRONG&gt;condition&lt;/STRONG&gt; . Which one of &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Anant should be distinguished ? sas take all of &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Anant as the same one .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 12:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Don-t-want-to-remove-trailing-spaces/m-p/216242#M53207</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-17T12:39:20Z</dc:date>
    </item>
  </channel>
</rss>

