<?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: Verifying that values of two variables don't overlap in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Verifying-that-values-of-two-variables-don-t-overlap/m-p/587675#M14723</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/288620"&gt;@bkq32&lt;/a&gt;&amp;nbsp; &amp;nbsp;By any chance, is this what you are after?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
 input id1$ id2$ nlev;
cards;
1 A 1
1 A 2
2 B 1
2 B 2
3 C 1
3 C 2
3 C 3
3 B 4
;
run;

proc sql;
create table want as
select *, count(distinct id1)&amp;gt;1 as flag
from have
group by id2
order by id1,nlev;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Sep 2019 20:30:39 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-09-10T20:30:39Z</dc:date>
    <item>
      <title>Verifying that values of two variables don't overlap</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Verifying-that-values-of-two-variables-don-t-overlap/m-p/587673#M14722</link>
      <description>&lt;P&gt;I have a data set with two IDs and variable NLEV to identify ID1 duplicates:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
 input id1$ id2$ nlev;
cards;
1 A 1
1 A 2
2 B 1
2 B 2
3 C 1
3 C 2
3 C 3
3 B 4
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How can I verify that values for ID2 only correspond to one unique ID1 value. In this example, I'd want SAS to flag records where ID2="B" (or something similar) because ID2="B" corresponds to both ID1=2 and ID1=3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 20:23:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Verifying-that-values-of-two-variables-don-t-overlap/m-p/587673#M14722</guid>
      <dc:creator>bkq32</dc:creator>
      <dc:date>2019-09-10T20:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying that values of two variables don't overlap</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Verifying-that-values-of-two-variables-don-t-overlap/m-p/587675#M14723</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/288620"&gt;@bkq32&lt;/a&gt;&amp;nbsp; &amp;nbsp;By any chance, is this what you are after?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
 input id1$ id2$ nlev;
cards;
1 A 1
1 A 2
2 B 1
2 B 2
3 C 1
3 C 2
3 C 3
3 B 4
;
run;

proc sql;
create table want as
select *, count(distinct id1)&amp;gt;1 as flag
from have
group by id2
order by id1,nlev;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Sep 2019 20:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Verifying-that-values-of-two-variables-don-t-overlap/m-p/587675#M14723</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-09-10T20:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying that values of two variables don't overlap</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Verifying-that-values-of-two-variables-don-t-overlap/m-p/587676#M14724</link>
      <description>&lt;P&gt;Yes, that's perfect. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 20:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Verifying-that-values-of-two-variables-don-t-overlap/m-p/587676#M14724</guid>
      <dc:creator>bkq32</dc:creator>
      <dc:date>2019-09-10T20:33:37Z</dc:date>
    </item>
  </channel>
</rss>

