<?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: PROC SQL: How to Identify and exclude wrong mapping records from a sales table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785341#M250627</link>
    <description>&lt;P&gt;Andreas, yes you're correct. I&amp;nbsp;&lt;SPAN&gt;want to create the dataset "error_mapping" containing obs with matching "mapped_to" but non-matching "id", and another dataset with containing those obs from "sales" that don't match any "mapped_to" in your "standard_mapping" datase.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While I was trying to update the data table, the question got corrupted. I will re-write the question and post again. Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 09:51:27 GMT</pubDate>
    <dc:creator>tnachis</dc:creator>
    <dc:date>2021-12-10T09:51:27Z</dc:date>
    <item>
      <title>PROC SQL: How to Identify and exclude wrong records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785301#M250601</link>
      <description>&lt;P&gt;i have two table, (Standard Mapping Table) containing "Mapped To" column and "ID" column. One "ID" can have multiple "Mapped To" values.&lt;BR /&gt;The second table is the (Sales table) containing "Mapped To" column and "ID" column. The "Mapped To" and "ID" vales in the Sales table must match/follow the order in the Standard Mapping Table.&amp;amp;nbsp;&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Note:&lt;BR /&gt;&lt;BR /&gt;All "ID" in the Sales table already exist in the&amp;amp;nbsp;Standard Mapping Table.&lt;BR /&gt;There can be new "Mapped To" value created in the Sales table that does not have a matching "ID" in the&amp;amp;nbsp;Standard Mapping Table.&amp;amp;nbsp;&lt;BR /&gt;The "Mapped To" value in the Sales table was assigned wrong "ID"&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Target:&lt;BR /&gt;&lt;BR /&gt;I would like to Join the (Sales table) to the (Standard Mapping Table) on Mapped To and ID.&lt;BR /&gt;Then, identify and exclude all values in the (Sales table) that do not match the order in the&amp;amp;nbsp;Standard Mapping Table.&amp;amp;nbsp;&lt;BR /&gt;Also, Identify the New "Mapped To" values created in the Sales table that are not yet recognized in the&amp;amp;nbsp;Standard Mapping Table&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Standard Mapping Table&lt;BR /&gt;Mapped To&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ID&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&lt;BR /&gt;AB&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; D20&amp;amp;nbsp;&amp;amp;nbsp;&lt;BR /&gt;BC&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; D20&lt;BR /&gt;CA&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; D20&lt;BR /&gt;DE&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;A30&lt;BR /&gt;EF&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;A30&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Sales Table&amp;amp;nbsp;&lt;BR /&gt;Mapped To&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;ID&lt;BR /&gt;AB&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; D20&lt;BR /&gt;BC&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; A30&lt;BR /&gt;DE&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; A30&lt;BR /&gt;JK&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;JK&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Desired Result:&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Sales Table1 (Error Mapping)&lt;BR /&gt;Mapped To&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;ID&lt;BR /&gt;BC&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; A30&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Sales Table 2 (New Mapped To and ID created)&lt;BR /&gt;Mapped To&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;ID&lt;BR /&gt;JK&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;JK&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Please can you help?&amp;amp;nbsp;&lt;BR /&gt;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 16:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785301#M250601</guid>
      <dc:creator>tnachis</dc:creator>
      <dc:date>2021-12-10T16:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL: How to Identify and exclude wrong mapping records from a sales table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785314#M250612</link>
      <description>&lt;P&gt;In other words: you want to create the dataset "error_mapping" containing obs with matching "mapped_to" but non-matching "id", and another dataset with containing those obs from "sales" that don't match any "mapped_to" in your "standard_mapping" dataset. Right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand what "... that do not match the order in the Standard Mapping Table" in the second target means.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 07:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785314#M250612</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-12-10T07:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL: How to Identify and exclude wrong mapping records from a sales table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785324#M250619</link>
      <description>&lt;P&gt;Please look at you posted "data".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post it in some legible form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best way to provide example data, especially if you would like working code examples or code that may work, is to provide data in the form of data step code.&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 08:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785324#M250619</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-10T08:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL: How to Identify and exclude wrong mapping records from a sales table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785341#M250627</link>
      <description>&lt;P&gt;Andreas, yes you're correct. I&amp;nbsp;&lt;SPAN&gt;want to create the dataset "error_mapping" containing obs with matching "mapped_to" but non-matching "id", and another dataset with containing those obs from "sales" that don't match any "mapped_to" in your "standard_mapping" datase.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While I was trying to update the data table, the question got corrupted. I will re-write the question and post again. Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 09:51:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-How-to-Identify-and-exclude-wrong-records/m-p/785341#M250627</guid>
      <dc:creator>tnachis</dc:creator>
      <dc:date>2021-12-10T09:51:27Z</dc:date>
    </item>
  </channel>
</rss>

