<?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 PROC SQL: How to Identify and exclude Error records from a sales table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-Error-records-from-a-sales/m-p/785421#M250654</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have two table, (Standard Table) containing "Orig ID" column and "ID" column. One "ID" can have multiple "Orig ID" values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The second table is the (Sales table) containing "Orig ID" column and "ID" column. The "Orig ID" and "ID" vales in the Sales table must match/follow the order in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All "ID" in the Sales table already exist in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There can be new "Orig ID" value created in the Sales table that does not have a matching "ID" in the&amp;nbsp; Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the "Orig ID" value in the Sales table was assigned a wrong "ID"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Target:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to Join the (Sales table) to the (Standard Table) on Mapped To and ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, identify and exclude all values in the (Sales table) that do not match the order in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, Identify the New "Orig ID" values created in the Sales table that are not yet recognized in the Standard Mapping Table&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;Standard Table&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&lt;/U&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;&lt;P&gt;JL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A20&lt;/P&gt;&lt;P&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;nbsp;Outcome:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;want to create the dataset "error_table" containing obs with matching "Orig ID" but non-matching "id", and another dataset "NEW ID Table" containing those obs from "sales" that the value in "orig Id" is same as "ID" (this is because&amp;nbsp;the new "Orig id" created in the sales table is always same as the "ID").&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sales Table&lt;/P&gt;&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NEW ID Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sales Table&lt;/P&gt;&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 16:11:06 GMT</pubDate>
    <dc:creator>tnachis</dc:creator>
    <dc:date>2021-12-10T16:11:06Z</dc:date>
    <item>
      <title>PROC SQL: How to Identify and exclude Error records from a sales table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-Error-records-from-a-sales/m-p/785421#M250654</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have two table, (Standard Table) containing "Orig ID" column and "ID" column. One "ID" can have multiple "Orig ID" values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The second table is the (Sales table) containing "Orig ID" column and "ID" column. The "Orig ID" and "ID" vales in the Sales table must match/follow the order in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All "ID" in the Sales table already exist in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There can be new "Orig ID" value created in the Sales table that does not have a matching "ID" in the&amp;nbsp; Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the "Orig ID" value in the Sales table was assigned a wrong "ID"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Target:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to Join the (Sales table) to the (Standard Table) on Mapped To and ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, identify and exclude all values in the (Sales table) that do not match the order in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, Identify the New "Orig ID" values created in the Sales table that are not yet recognized in the Standard Mapping Table&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;Standard Table&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&lt;/U&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;&lt;P&gt;JL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A20&lt;/P&gt;&lt;P&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;nbsp;Outcome:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;want to create the dataset "error_table" containing obs with matching "Orig ID" but non-matching "id", and another dataset "NEW ID Table" containing those obs from "sales" that the value in "orig Id" is same as "ID" (this is because&amp;nbsp;the new "Orig id" created in the sales table is always same as the "ID").&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sales Table&lt;/P&gt;&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NEW ID Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sales Table&lt;/P&gt;&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 16:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-Error-records-from-a-sales/m-p/785421#M250654</guid>
      <dc:creator>tnachis</dc:creator>
      <dc:date>2021-12-10T16:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL: How to Identify and exclude Error records from a sales table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-Error-records-from-a-sales/m-p/785428#M250658</link>
      <description>&lt;P&gt;I might try:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   create table salesNotStandard as
   select distinct origid, id from salestable
   except
   select distinct origid, id from standardtable
   ;
   create table StandardNotsales as
   select distinct origid, id from standardtable
   except
   select distinct origid, id from salestable
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;I didn't use your table names as I wasn't quite sure which is really an "error". So use more descriptive "SalesNotStandard" means the id combination appears in Sales but Not the Standard data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/402031"&gt;@tnachis&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;I have two table, (Standard Table) containing "Orig ID" column and "ID" column. One "ID" can have multiple "Orig ID" values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The second table is the (Sales table) containing "Orig ID" column and "ID" column. The "Orig ID" and "ID" vales in the Sales table must match/follow the order in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All "ID" in the Sales table already exist in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There can be new "Orig ID" value created in the Sales table that does not have a matching "ID" in the&amp;nbsp; Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the "Orig ID" value in the Sales table was assigned a wrong "ID"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Target:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to Join the (Sales table) to the (Standard Table) on Mapped To and ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, identify and exclude all values in the (Sales table) that do not match the order in the Standard Table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, Identify the New "Orig ID" values created in the Sales table that are not yet recognized in the Standard Mapping Table&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;Standard Table&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&lt;/U&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A20&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A20&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;CD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A20&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;
&lt;P&gt;JL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B30&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sales Table&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A20&lt;/P&gt;
&lt;P&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;
&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JK&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Desired&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;nbsp;Outcome:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;want to create the dataset "error_table" containing obs with matching "Orig ID" but non-matching "id", and another dataset "NEW ID Table" containing those obs from "sales" that the value in "orig Id" is same as "ID" (this is because&amp;nbsp;the new "Orig id" created in the sales table is always same as the "ID").&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Error Table:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Sales Table&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;BC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B30&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NEW ID Table:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Sales Table&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Orig ID&lt;/U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;ID&amp;nbsp;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;JK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JK&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 16:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-Error-records-from-a-sales/m-p/785428#M250658</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-10T16:33:26Z</dc:date>
    </item>
  </channel>
</rss>

