<?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: Investigate whether each value in Column A occurs somewhere in Column B. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835846#M41487</link>
    <description>&lt;P&gt;You likely will need to clearly define "occurs somewhere in column B".&lt;/P&gt;
&lt;P&gt;Suppose you have a value for A of "apple".&lt;/P&gt;
&lt;P&gt;Does that "occur" in B if B has a value of "Apple" (case difference)? If B is "apple&amp;nbsp; pear" (not equal to but is part of the string? If B is "APPLE pear" case and part of string? If B is "applesauce" part of the string but not a whole word? If B is "Applesauce Pear juice" case difference and part of a string but not a whole word?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If A is a more complex value such as "apple banana grape" then you get even more complex elements to consider such as all the components of A are in B but the order is different, in addition to the not word sub-string possibilities.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2022 14:18:20 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-09-29T14:18:20Z</dc:date>
    <item>
      <title>Investigate whether each value in Column A occurs somewhere in Column B.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835809#M41482</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi! I am looking for some help with a SAS-code. In one data set I have two columns (A and B). I would like to check, whether each value in Column A occurs somewhere in Column B. Can you help me out?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 11:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835809#M41482</guid>
      <dc:creator>Sille</dc:creator>
      <dc:date>2022-09-29T11:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Investigate whether each value in Column A occurs somewhere in Column B.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835813#M41483</link>
      <description>&lt;P&gt;Please provide some example data, and the output you would want from that data.&amp;nbsp; Also please show the code you have tried.&amp;nbsp; This will help people help you.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 11:53:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835813#M41483</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-09-29T11:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Investigate whether each value in Column A occurs somewhere in Column B.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835819#M41484</link>
      <description>Check INTERSCEPT and EXCEPT in PROC SQL:&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select A from have&lt;BR /&gt;intersect&lt;BR /&gt;select B from have;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select A from have&lt;BR /&gt;except&lt;BR /&gt;select B from have;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Sep 2022 12:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835819#M41484</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-09-29T12:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Investigate whether each value in Column A occurs somewhere in Column B.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835843#M41486</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/435168"&gt;@Sille&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use a DATA step that stops as soon as an A value was &lt;EM&gt;not&lt;/EM&gt; found in column B.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
dcl hash h(dataset:'have(keep=b)');
h.definekey('b');
h.definedone();
do until(last);
  set have end=last;
  if h.check(key:a) then do;
    put A= 'does not occur in column B.';
    stop;
  end;
end;
put 'Success! All A values were found in column B.';
stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Sep 2022 14:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835843#M41486</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-09-29T14:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Investigate whether each value in Column A occurs somewhere in Column B.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835846#M41487</link>
      <description>&lt;P&gt;You likely will need to clearly define "occurs somewhere in column B".&lt;/P&gt;
&lt;P&gt;Suppose you have a value for A of "apple".&lt;/P&gt;
&lt;P&gt;Does that "occur" in B if B has a value of "Apple" (case difference)? If B is "apple&amp;nbsp; pear" (not equal to but is part of the string? If B is "APPLE pear" case and part of string? If B is "applesauce" part of the string but not a whole word? If B is "Applesauce Pear juice" case difference and part of a string but not a whole word?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If A is a more complex value such as "apple banana grape" then you get even more complex elements to consider such as all the components of A are in B but the order is different, in addition to the not word sub-string possibilities.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 14:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Investigate-whether-each-value-in-Column-A-occurs-somewhere-in/m-p/835846#M41487</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-09-29T14:18:20Z</dc:date>
    </item>
  </channel>
</rss>

