<?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: How to compare two character fields to check if they are equal in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412208#M26479</link>
    <description>&lt;P&gt;Thank you Reeza for replying quickly.&lt;/P&gt;&lt;P&gt;I changed the format to $hex32. and I see they are different as below in the 9th postion from left and some other letters as well inside the string.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Add1&lt;/TD&gt;&lt;TD&gt;Add2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11 JANE ST&lt;/TD&gt;&lt;TD&gt;11 JANE ST&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3131204A616E65205374202020202020&lt;/TD&gt;&lt;TD&gt;3131204A414E45205354202020202020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not with HEX format before and not sure if I've got your advice right and also I dont know how to recognise if it is because of space or not. So could you please let me know how I can remove potential space inside the text if there is any solution?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2017 04:13:05 GMT</pubDate>
    <dc:creator>AMIN_DA</dc:creator>
    <dc:date>2017-11-10T04:13:05Z</dc:date>
    <item>
      <title>How to compare two character fields to check if they are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412205#M26477</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I would like to check if 2 addresses are equal. I am using Compare function but for the ones I assume they are equal instead of 0 I get a number.&lt;/P&gt;&lt;P&gt;here is my example:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Add1&lt;/TD&gt;&lt;TD&gt;Add2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11 JANE ST&lt;/TD&gt;&lt;TD&gt;11 JANE ST&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compare(Add1,Add2) but instread of 0 it SAS EG gives me 5. I checked in Excel and Excel resut is these 2 are equal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you please help out with this issu?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 03:37:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412205#M26477</guid>
      <dc:creator>AMIN_DA</dc:creator>
      <dc:date>2017-11-10T03:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two character fields to check if they are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412207#M26478</link>
      <description>&lt;P&gt;Please provide a reproducible sample so that we replicate your issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can't replicate it, it's an issue with your data. Try looking at the data with a HEX format to see if its different.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have spaces in one and a different invisible character in others.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of how to use the HEX format to see the difference&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
set sashelp.class;

put name $hex32.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 03:45:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412207#M26478</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-10T03:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two character fields to check if they are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412208#M26479</link>
      <description>&lt;P&gt;Thank you Reeza for replying quickly.&lt;/P&gt;&lt;P&gt;I changed the format to $hex32. and I see they are different as below in the 9th postion from left and some other letters as well inside the string.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Add1&lt;/TD&gt;&lt;TD&gt;Add2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11 JANE ST&lt;/TD&gt;&lt;TD&gt;11 JANE ST&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3131204A616E65205374202020202020&lt;/TD&gt;&lt;TD&gt;3131204A414E45205354202020202020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not with HEX format before and not sure if I've got your advice right and also I dont know how to recognise if it is because of space or not. So could you please let me know how I can remove potential space inside the text if there is any solution?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 04:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412208#M26479</guid>
      <dc:creator>AMIN_DA</dc:creator>
      <dc:date>2017-11-10T04:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two character fields to check if they are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412215#M26481</link>
      <description>&lt;P&gt;it was fixed by COMPARE(TRIM(UPCASE(Add1 )), TRIM(UPCASE( Add2)))&lt;/P&gt;&lt;P&gt;thanks again Reeza&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 04:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-compare-two-character-fields-to-check-if-they-are-equal/m-p/412215#M26481</guid>
      <dc:creator>AMIN_DA</dc:creator>
      <dc:date>2017-11-10T04:56:08Z</dc:date>
    </item>
  </channel>
</rss>

