<?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: Comparing two records on key values and applying filters in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Comparing-two-records-on-key-values-and-applying-filters/m-p/644157#M785</link>
    <description>Thank you Chris.I will refer to your high performance SAS coding reference. Thank you for guiding me.</description>
    <pubDate>Thu, 30 Apr 2020 06:41:16 GMT</pubDate>
    <dc:creator>Jagadeesh2907</dc:creator>
    <dc:date>2020-04-30T06:41:16Z</dc:date>
    <item>
      <title>Comparing two records on key values and applying filters</title>
      <link>https://communities.sas.com/t5/Developers/Comparing-two-records-on-key-values-and-applying-filters/m-p/644009#M782</link>
      <description>&lt;P&gt;Hi I have a customer linking dataset and i have five attibutes by below example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;APPLICATION_NUM LINK_CUSTOMER_ID TEMP_CUSTOMER_ID LINKED_CUSTOMER_ID LINK_TYPE&lt;BR /&gt;11661523 9086964 9572284 6543652 160&lt;BR /&gt;11661523 9086964 9572284 9572284 190&lt;BR /&gt;11661523 9572284 9572284 6543652 160&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is want to do is to identify records with same application_num and link_customer_id and when they are same, i want to output only the record when the temp_customer_id is equal to linked_customer_id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that is for this example: i would need the output to be as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;APPLICATION_NUM LINK_CUSTOMER_ID TEMP_CUSTOMER_ID LINKED_CUSTOMER_ID LINK_TYPE&lt;BR /&gt;11661523 9086964 9572284 9572284 190&lt;BR /&gt;11661523 9572284 9572284 6543652 160&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 16:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Comparing-two-records-on-key-values-and-applying-filters/m-p/644009#M782</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2020-04-29T16:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two records on key values and applying filters</title>
      <link>https://communities.sas.com/t5/Developers/Comparing-two-records-on-key-values-and-applying-filters/m-p/644095#M783</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107894"&gt;@Jagadeesh2907&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;You know you need to provide the data as a data step (that you have run and vetted *from the code pasted*).&lt;/P&gt;
&lt;P&gt;Please do so.&lt;/P&gt;
&lt;P&gt;This should give you a starting point:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
input APPLICATION_NUM LINK_CUSTOMER_ID TEMP_CUSTOMER_ID LINKED_CUSTOMER_ID LINK_TYPE ;
cards;
11661523 9086964 9572284 6543652 160
11661523 9086964 9572284 9572284 190
11661523 9572284 9572284 6543652 160
;
proc sql;
  select *
        , TEMP_CUSTOMER_ID=LINKED_CUSTOMER_ID  as FLAG
        , count(*)                             as DUP
  from HAVE
  group by APPLICATION_NUM, LINK_CUSTOMER_ID  
  having DUP=1 | FLAG=1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;&lt;A name="IDX" target="_blank"&gt;&lt;/A&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure SQL: Query Results" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r b header" scope="col"&gt;APPLICATION_NUM&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;LINK_CUSTOMER_ID&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;TEMP_CUSTOMER_ID&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;LINKED_CUSTOMER_ID&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;LINK_TYPE&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;FLAG&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;DUP&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;11661523&lt;/TD&gt;
&lt;TD class="r data"&gt;9086964&lt;/TD&gt;
&lt;TD class="r data"&gt;9572284&lt;/TD&gt;
&lt;TD class="r data"&gt;9572284&lt;/TD&gt;
&lt;TD class="r data"&gt;190&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;11661523&lt;/TD&gt;
&lt;TD class="r data"&gt;9572284&lt;/TD&gt;
&lt;TD class="r data"&gt;9572284&lt;/TD&gt;
&lt;TD class="r data"&gt;6543652&lt;/TD&gt;
&lt;TD class="r data"&gt;160&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 21:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Comparing-two-records-on-key-values-and-applying-filters/m-p/644095#M783</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-04-29T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two records on key values and applying filters</title>
      <link>https://communities.sas.com/t5/Developers/Comparing-two-records-on-key-values-and-applying-filters/m-p/644157#M785</link>
      <description>Thank you Chris.I will refer to your high performance SAS coding reference. Thank you for guiding me.</description>
      <pubDate>Thu, 30 Apr 2020 06:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Comparing-two-records-on-key-values-and-applying-filters/m-p/644157#M785</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2020-04-30T06:41:16Z</dc:date>
    </item>
  </channel>
</rss>

