<?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: Removing apostrophes row-by-row in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756731#M238980</link>
    <description>&lt;P&gt;I applied the compress code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I received the following result in the log&lt;/P&gt;
&lt;PRE&gt;7121  Data SASCDC_2.Arias_NAICS_Classify_H;
7122     *Retain Contact_Person_ID Place_of_Employment NAICS_Sector Sector_Type Type_Firm
7122! Other_Categories;
7123     P_O_E = COMPRESS(Place_of_employment, "'");
7124  Set SASCDC_2.Arias_NAICS_Classify_H;
ERROR: Variable Place_of_employment has been defined as both character and numeric.
7125  run;

NOTE: Numeric values have been converted to character values at the places given by:
      (Line):(Column).
      7123:21
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set SASCDC_2.ARIAS_NAICS_CLASSIFY_H may be incomplete.  When this step was
         stopped there were 0 observations and 8 variables.
WARNING: Data set SASCDC_2.ARIAS_NAICS_CLASSIFY_H was not replaced because this step was
         stopped.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;Place_of_employment is a character variable.&amp;nbsp; But does the compress function convert it to numeric?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jul 2021 17:38:35 GMT</pubDate>
    <dc:creator>wlierman</dc:creator>
    <dc:date>2021-07-26T17:38:35Z</dc:date>
    <item>
      <title>Removing apostrophes row-by-row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756701#M238965</link>
      <description>&lt;P&gt;I have a question on how to remove only apostrophes from proper names on a row-by-row basis. There maybe more than one apostrophe that must be removed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example I have "place of employment" field and the entries in this field are names of businesses.&amp;nbsp; But the same business names are not entered consistently so that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FREDS PHARMACY&lt;/P&gt;
&lt;P&gt;FRED'S PHARMACY&lt;/P&gt;
&lt;P&gt;OREGON CITY FRED MEYER&lt;/P&gt;
&lt;P&gt;OREGON CITY'S FRED MEYER&lt;/P&gt;
&lt;P&gt;OREGON CITY FRED MEYER'S&lt;/P&gt;
&lt;P&gt;JIMS GLADSTONE SUBARU CARS AND TRUCKS&lt;/P&gt;
&lt;P&gt;JIM'S GLADSTONE SUBARU CAR'S AND TRUCK'S&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what I want is the apostrophes removed so the names of businesses above look like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FREDS PHARMACY&lt;/P&gt;
&lt;P&gt;FREDS PHARMACY&lt;/P&gt;
&lt;P&gt;OREGON CITY FRED MEYER&lt;/P&gt;
&lt;P&gt;OREGON CITYS FRED MEYER&lt;/P&gt;
&lt;P&gt;OREGON CITY FRED MEYERS&lt;/P&gt;
&lt;P&gt;JIMS GLADSTONE SUBARU CARS AND TRUCKS&lt;/P&gt;
&lt;P&gt;JIMS GLADSTONE SUBARU CARS AND TRUCKS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't care about duplicates since each row is a unique contact.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have slightly over 30,000 non-duplicated rows to check and then remove any apostrophes.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 16:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756701#M238965</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2021-07-26T16:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Removing apostrophes row-by-row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756702#M238966</link>
      <description>How can you define a proper name apostrophe from other apostrophes?&lt;BR /&gt;&lt;BR /&gt;You can use COMPRESS() to remove all apostrophes, but removing it from proper names isn't an easy task.</description>
      <pubDate>Mon, 26 Jul 2021 16:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756702#M238966</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-26T16:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Removing apostrophes row-by-row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756703#M238967</link>
      <description>&lt;P&gt;The compress function will remove characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   x="JIM'S GLADSTONE SUBARU CAR'S AND TRUCK'S";
   y=compress(x,"'");
run;&lt;/PRE&gt;
&lt;P&gt;I use the double quotes around the character to remove in compress for legibility and create a new variable so you can compare results.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 16:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756703#M238967</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-26T16:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Removing apostrophes row-by-row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756731#M238980</link>
      <description>&lt;P&gt;I applied the compress code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I received the following result in the log&lt;/P&gt;
&lt;PRE&gt;7121  Data SASCDC_2.Arias_NAICS_Classify_H;
7122     *Retain Contact_Person_ID Place_of_Employment NAICS_Sector Sector_Type Type_Firm
7122! Other_Categories;
7123     P_O_E = COMPRESS(Place_of_employment, "'");
7124  Set SASCDC_2.Arias_NAICS_Classify_H;
ERROR: Variable Place_of_employment has been defined as both character and numeric.
7125  run;

NOTE: Numeric values have been converted to character values at the places given by:
      (Line):(Column).
      7123:21
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set SASCDC_2.ARIAS_NAICS_CLASSIFY_H may be incomplete.  When this step was
         stopped there were 0 observations and 8 variables.
WARNING: Data set SASCDC_2.ARIAS_NAICS_CLASSIFY_H was not replaced because this step was
         stopped.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;Place_of_employment is a character variable.&amp;nbsp; But does the compress function convert it to numeric?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 17:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756731#M238980</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2021-07-26T17:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Removing apostrophes row-by-row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756734#M238981</link>
      <description>Move the code to after the SET statement. Before the variable doesn't exist.</description>
      <pubDate>Mon, 26 Jul 2021 17:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756734#M238981</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-26T17:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Removing apostrophes row-by-row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756738#M238982</link>
      <description>&lt;P&gt;You put the cart before the horse.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data SASCDC_2.Arias_NAICS_Classify_H;
  set SASCDC_2.Arias_NAICS_Classify_H;
  P_O_E = COMPRESS(Place_of_employment, "'");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 18:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756738#M238982</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-26T18:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Removing apostrophes row-by-row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756756#M238990</link>
      <description>&lt;P&gt;Thank you for the help.&lt;/P&gt;
&lt;P&gt;I tend to put the cart before the horse quite often!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 18:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-apostrophes-row-by-row/m-p/756756#M238990</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2021-07-26T18:52:01Z</dc:date>
    </item>
  </channel>
</rss>

