<?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: How to check whether account number in Excel spreadsheet are in SAS dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-account-number-in-Excel-spreadsheet-are-in/m-p/632418#M187502</link>
    <description>&lt;P&gt;First you import the Excel file into a SAS data set. Then you can use PROC SQL joins to answer both of your questions.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 12:35:13 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-03-16T12:35:13Z</dc:date>
    <item>
      <title>How to check whether account number in Excel spreadsheet are in SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-account-number-in-Excel-spreadsheet-are-in/m-p/632415#M187500</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Excel spreadsheet (titled "Account number query"), who contains a list of approximately 500 account numbers (variable is called "ACCOUNT_NUMBER"). The Excel spreadsheet can be found in the following location for me (if the Excel spreadsheet needs to be imported):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; G:\2. Projects\2020\Account number query.xlsm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been asked whether these 500 account numbers on the Excel spreadsheet are in the SAS dataset (ac.account_information), which has over a million observations and also contains the same "ACCOUNT_NUMBER" variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can someone help with the &lt;U&gt;&lt;STRONG&gt;code required&lt;/STRONG&gt;&lt;/U&gt; to answer the following two questions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Question 1&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Would it be possible to show which account numbers are in &lt;STRONG&gt;&lt;U&gt;both&lt;/U&gt; &lt;/STRONG&gt;the Excel spreadsheet (titled "Account number query") and the SAS dataset (ac.account_information), and which&amp;nbsp;account numbers are in the Excel spreadsheet but &lt;STRONG&gt;&lt;U&gt;not&lt;/U&gt; &lt;/STRONG&gt;the SAS dataset? Does the Excel spreadsheet information have to be imported to create a new SAS dataset, then compare it with the SAS dataset&amp;nbsp;(ac.account_information)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Question 2&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Where the "ACCOUNT_NUMBER" is the &lt;U&gt;&lt;STRONG&gt;same&lt;/STRONG&gt; &lt;/U&gt;in &lt;U&gt;&lt;STRONG&gt;both&lt;/STRONG&gt; &lt;/U&gt;the Excel spreadsheet and the SAS dataset, would it be possible to merge on just the "DATE_OPEN" and "BALANCE" fields (and not "MONTH_END") from the Excel spreadsheet (see screenshot below) onto the SAS dataset for the matching "ACCOUNT_NUMBER" observations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Information&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;In the &lt;U&gt;&lt;STRONG&gt;SAS dataset&lt;/STRONG&gt;&lt;/U&gt; (ac.account_information), the "ACCOUNT_NUMBER" variable is a &lt;STRONG&gt;&lt;U&gt;character type&lt;/U&gt;&lt;/STRONG&gt;, with a &lt;U&gt;&lt;STRONG&gt;$30. format&lt;/STRONG&gt;&lt;/U&gt; and &lt;U&gt;&lt;STRONG&gt;informat of $30&lt;/STRONG&gt;&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A example of the Excel spradsheet (Account number query) is shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Account number query sample.JPG" style="width: 510px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36903i34B1F51D43F43B2B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Account number query sample.JPG" alt="Account number query sample.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 12:43:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-account-number-in-Excel-spreadsheet-are-in/m-p/632415#M187500</guid>
      <dc:creator>jeremy4</dc:creator>
      <dc:date>2020-03-16T12:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether account number in Excel spreadsheet are in SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-account-number-in-Excel-spreadsheet-are-in/m-p/632418#M187502</link>
      <description>&lt;P&gt;First you import the Excel file into a SAS data set. Then you can use PROC SQL joins to answer both of your questions.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 12:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-account-number-in-Excel-spreadsheet-are-in/m-p/632418#M187502</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-16T12:35:13Z</dc:date>
    </item>
  </channel>
</rss>

