<?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 How to identify multiple results from same variable in one table in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-identify-multiple-results-from-same-variable-in-one-table/m-p/824813#M35190</link>
    <description>&lt;P&gt;I would like to know who has got Apple and Pear.&lt;/P&gt;&lt;P&gt;Output expecting to see John and Grant only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;data person;&lt;BR /&gt;input name $ products$;&lt;BR /&gt;datalines;&lt;BR /&gt;John Apple&lt;BR /&gt;John Pear&lt;BR /&gt;Mary Apple&lt;/P&gt;&lt;P&gt;Helen Apple&lt;BR /&gt;Helen Orange&lt;BR /&gt;Grant Apple&lt;BR /&gt;Grant Pear&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2022 04:13:21 GMT</pubDate>
    <dc:creator>miss2223</dc:creator>
    <dc:date>2022-07-22T04:13:21Z</dc:date>
    <item>
      <title>How to identify multiple results from same variable in one table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-identify-multiple-results-from-same-variable-in-one-table/m-p/824813#M35190</link>
      <description>&lt;P&gt;I would like to know who has got Apple and Pear.&lt;/P&gt;&lt;P&gt;Output expecting to see John and Grant only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;data person;&lt;BR /&gt;input name $ products$;&lt;BR /&gt;datalines;&lt;BR /&gt;John Apple&lt;BR /&gt;John Pear&lt;BR /&gt;Mary Apple&lt;/P&gt;&lt;P&gt;Helen Apple&lt;BR /&gt;Helen Orange&lt;BR /&gt;Grant Apple&lt;BR /&gt;Grant Pear&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 04:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-identify-multiple-results-from-same-variable-in-one-table/m-p/824813#M35190</guid>
      <dc:creator>miss2223</dc:creator>
      <dc:date>2022-07-22T04:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify multiple results from same variable in one table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-identify-multiple-results-from-same-variable-in-one-table/m-p/824821#M35191</link>
      <description>&lt;P&gt;What have you tried?&lt;/P&gt;
&lt;P&gt;Do you want a dataset or a report?&lt;/P&gt;
&lt;P&gt;In both cases: use a where statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 05:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-identify-multiple-results-from-same-variable-in-one-table/m-p/824821#M35191</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-07-22T05:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify multiple results from same variable in one table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-identify-multiple-results-from-same-variable-in-one-table/m-p/825018#M35194</link>
      <description>&lt;PRE&gt;proc sort data=person;&lt;BR /&gt;    by name;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc transpose data=person out=person_t(drop=_name_);&lt;BR /&gt;    by name;&lt;BR /&gt;    var products;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data person2;&lt;BR /&gt;    set person_t;&lt;BR /&gt;    all_prods=catx(',',of col:);&lt;BR /&gt;    if prxmatch('/Apple,Pear|Pear,Apple/i',all_prods);&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 20:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-identify-multiple-results-from-same-variable-in-one-table/m-p/825018#M35194</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-07-22T20:19:52Z</dc:date>
    </item>
  </channel>
</rss>

