<?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: Finding the duplicate values between two datasets in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866087#M38284</link>
    <description>Using an inner join in PROC SQL should work:&lt;BR /&gt;proc sql;&lt;BR /&gt;create table duplicate_reference_number as&lt;BR /&gt;select a.REFERENCE_NUMBER&lt;BR /&gt;from sep_release a INNER JOIN oct_release b&lt;BR /&gt;on a.REFERENCE_NUMBER = b.REFERENCE_NUMBER;&lt;BR /&gt;quit;&lt;BR /&gt;</description>
    <pubDate>Fri, 24 Mar 2023 11:40:27 GMT</pubDate>
    <dc:creator>svh</dc:creator>
    <dc:date>2023-03-24T11:40:27Z</dc:date>
    <item>
      <title>Finding the duplicate values between two datasets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866081#M38283</link>
      <description>&lt;P&gt;I have two SAS datasets. First one is Sep_release and second one is Oct_release. Both the datasets have REFERENCE_NUMBER as common variables. I want to find if the REFERENCE_NUMBER released in sep_release is also coming in Oct_release. Basically trying to find the duplicate REFERENCE_NUMBER in both the datasets. But I am unsure of best way of doing it. I tried proc sort and data step but not getting the result as the code is not right and I am unsure of the right way to approach. Can you please suggest?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data duplicate_REFERENCE_NUMBER;
 set sep_release oct_release;
 if not (first.REFERENCE_NUMBER) then output;
run;

Also, I tried this step

Proc sort data=sep_release
nodupkey dupout=oct_release;
by REFERENCE_NUMBER;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Mar 2023 10:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866081#M38283</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-03-24T10:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the duplicate values between two datasets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866087#M38284</link>
      <description>Using an inner join in PROC SQL should work:&lt;BR /&gt;proc sql;&lt;BR /&gt;create table duplicate_reference_number as&lt;BR /&gt;select a.REFERENCE_NUMBER&lt;BR /&gt;from sep_release a INNER JOIN oct_release b&lt;BR /&gt;on a.REFERENCE_NUMBER = b.REFERENCE_NUMBER;&lt;BR /&gt;quit;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Mar 2023 11:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866087#M38284</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2023-03-24T11:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the duplicate values between two datasets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866094#M38287</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
set sashelp.class;
run;
data b;
set sashelp.class;
if _n_=1 then delete;
run;


proc sql;
create table duplicate_name as
select name from a
intersect
select name from b
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Mar 2023 12:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866094#M38287</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-03-24T12:17:38Z</dc:date>
    </item>
  </channel>
</rss>

