<?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 Remove an apostrophe only at the end of a word in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Remove-an-apostrophe-only-at-the-end-of-a-word/m-p/865468#M42596</link>
    <description>&lt;P&gt;Is it possible to remove an apostrophe only at the end of a word in SAS EG query builder?&lt;/P&gt;
&lt;P&gt;I have the following data:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;EMPLOYEES' BANK&lt;/LI&gt;
&lt;LI&gt;ARTISANS' BANK&lt;/LI&gt;
&lt;LI&gt;TEACHERS' RETIREMENT SYSTEM&lt;/LI&gt;
&lt;LI&gt;DEVELOPER'S MORTGAGE COMPANY&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And would like a new computed column to show:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;EMPLOYEES BANK&lt;/LI&gt;
&lt;LI&gt;ARTISANS BANK&lt;/LI&gt;
&lt;LI&gt;TEACHERS RETIREMENT SYSTEM&lt;/LI&gt;
&lt;LI&gt;DEVELOPER'S MORTGAGE COMPANY&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2023 16:36:09 GMT</pubDate>
    <dc:creator>WorkUser</dc:creator>
    <dc:date>2023-03-21T16:36:09Z</dc:date>
    <item>
      <title>Remove an apostrophe only at the end of a word</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Remove-an-apostrophe-only-at-the-end-of-a-word/m-p/865468#M42596</link>
      <description>&lt;P&gt;Is it possible to remove an apostrophe only at the end of a word in SAS EG query builder?&lt;/P&gt;
&lt;P&gt;I have the following data:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;EMPLOYEES' BANK&lt;/LI&gt;
&lt;LI&gt;ARTISANS' BANK&lt;/LI&gt;
&lt;LI&gt;TEACHERS' RETIREMENT SYSTEM&lt;/LI&gt;
&lt;LI&gt;DEVELOPER'S MORTGAGE COMPANY&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And would like a new computed column to show:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;EMPLOYEES BANK&lt;/LI&gt;
&lt;LI&gt;ARTISANS BANK&lt;/LI&gt;
&lt;LI&gt;TEACHERS RETIREMENT SYSTEM&lt;/LI&gt;
&lt;LI&gt;DEVELOPER'S MORTGAGE COMPANY&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 16:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Remove-an-apostrophe-only-at-the-end-of-a-word/m-p/865468#M42596</guid>
      <dc:creator>WorkUser</dc:creator>
      <dc:date>2023-03-21T16:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Remove an apostrophe only at the end of a word</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Remove-an-apostrophe-only-at-the-end-of-a-word/m-p/865529#M42597</link>
      <description>&lt;P&gt;Don't know if the query builder uses the TRANWRD function.&lt;/P&gt;
&lt;P&gt;The tranwrd function replaces in the first parameter, the string found in the second parameter if present, with the third parameter. We use double quotes to encase a single quote to avoid syntax:"&lt;FONT color="#008000"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt; " to indicate single quote followed by space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have other characters that occur after the the single quote that are not letters that may indicate something else to change then repeat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example with code:&lt;/P&gt;
&lt;PRE&gt;data have;
  input var $30.;
datalines;
EMPLOYEES' BANK
ARTISANS' BANK
TEACHERS' RETIREMENT SYSTEM
DEVELOPER'S MORTGAGE COMPANY
;

data want;
   set have;
   var = tranwrd(var,"' "," ");
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2023 18:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Remove-an-apostrophe-only-at-the-end-of-a-word/m-p/865529#M42597</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-21T18:04:22Z</dc:date>
    </item>
  </channel>
</rss>

