<?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: SAS and Excel Comparing Values Between the Two in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-and-Excel-Comparing-Values-Between-the-Two/m-p/279114#M56224</link>
    <description>&lt;P&gt;Since you don't show the structure of the Excel file(s), it's hard to give exact advice-&lt;/P&gt;
&lt;P&gt;Either way, you need to get the Excel data accessible from SAS,&amp;nbsp;with a Libname Excel, or proc import, to name two ways.&lt;/P&gt;
&lt;P&gt;Then in your SQL, you could probably do some kind of correlated subquery.&lt;/P&gt;
&lt;P&gt;But that code is a bit awkward, so I think if your Excel data have right attributes, a join operation would be a simpler task.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2016 19:03:08 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-06-21T19:03:08Z</dc:date>
    <item>
      <title>SAS and Excel Comparing Values Between the Two</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-and-Excel-Comparing-Values-Between-the-Two/m-p/279100#M56222</link>
      <description>&lt;P&gt;I'm attempting to create two new fields in SAS based on info in an Excel sheet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within the SAS data, &lt;STRONG&gt;whenever the SERVICEPROVIDERID (in SAS) equals the NCPDP (in Excel)&lt;/STRONG&gt; do the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Create new AWP Rate field:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(CASE&lt;/P&gt;&lt;P&gt;WHEN t1.CHannel = 'Retail' and t1.Brand_Generic = 'Brand' and t1.MAC_Flag= 'AWP' then (&lt;STRONG&gt;bring in brand rate field from excel&lt;/STRONG&gt;)&lt;BR /&gt;WHEN t1.CHannel = 'Retail' and t1.Brand_Generic = 'Generic' and t1.MAC_Flag= 'NON-MAC' then (&lt;STRONG&gt;bring in generic rate field from excel&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;END) AS New_AWP_Rate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Create new Dispensing Fee field:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(CASE&lt;BR /&gt;WHEN t1.CHannel = 'Retail' and t1.Brand_Generic = 'Brand' and t1.MAC_Flag= 'AWP' then (&lt;STRONG&gt;bring in brand dispensing fee field from excel&lt;/STRONG&gt;)&lt;BR /&gt;WHEN t1.CHannel = 'Retail' and t1.Brand_Generic = 'Generic' and t1.MAC_Flag= 'NON-MAC' then (&lt;STRONG&gt;bring in generic dispensing fee field from excel&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;END) AS NewDispensingFee&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The bolded sentences are ones I don't understand how to implement in SAS. I am using SAS EG so I am able to import the excel sheet using the wizard and get it in to a SAS data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;JediApprentice&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 17:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-and-Excel-Comparing-Values-Between-the-Two/m-p/279100#M56222</guid>
      <dc:creator>JediApprentice</dc:creator>
      <dc:date>2016-06-21T17:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS and Excel Comparing Values Between the Two</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-and-Excel-Comparing-Values-Between-the-Two/m-p/279114#M56224</link>
      <description>&lt;P&gt;Since you don't show the structure of the Excel file(s), it's hard to give exact advice-&lt;/P&gt;
&lt;P&gt;Either way, you need to get the Excel data accessible from SAS,&amp;nbsp;with a Libname Excel, or proc import, to name two ways.&lt;/P&gt;
&lt;P&gt;Then in your SQL, you could probably do some kind of correlated subquery.&lt;/P&gt;
&lt;P&gt;But that code is a bit awkward, so I think if your Excel data have right attributes, a join operation would be a simpler task.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 19:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-and-Excel-Comparing-Values-Between-the-Two/m-p/279114#M56224</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-06-21T19:03:08Z</dc:date>
    </item>
  </channel>
</rss>

