<?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 SAS Query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Query/m-p/232318#M42345</link>
    <description>&lt;P&gt;My original code:&lt;/P&gt;
&lt;P&gt;%let customer = ('ABC','CDE');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data cust;&lt;/P&gt;
&lt;P&gt;set cust;&lt;/P&gt;
&lt;P&gt;if customer in &amp;amp;customer then discount = discount*0.1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question:&lt;/P&gt;
&lt;P&gt;I have put the customer info in dataset to avoid input manually into the program&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset (dataset name: CUST)&lt;/P&gt;
&lt;P&gt;customer&lt;/P&gt;
&lt;P&gt;ABC&lt;/P&gt;
&lt;P&gt;CDE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May i know how to read the customer name from the dataset? and work get the similar result as my original code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone can help? Please advise.&amp;nbsp; Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2015 20:00:45 GMT</pubDate>
    <dc:creator>Toffeeman</dc:creator>
    <dc:date>2015-10-29T20:00:45Z</dc:date>
    <item>
      <title>SAS Query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Query/m-p/232318#M42345</link>
      <description>&lt;P&gt;My original code:&lt;/P&gt;
&lt;P&gt;%let customer = ('ABC','CDE');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data cust;&lt;/P&gt;
&lt;P&gt;set cust;&lt;/P&gt;
&lt;P&gt;if customer in &amp;amp;customer then discount = discount*0.1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question:&lt;/P&gt;
&lt;P&gt;I have put the customer info in dataset to avoid input manually into the program&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset (dataset name: CUST)&lt;/P&gt;
&lt;P&gt;customer&lt;/P&gt;
&lt;P&gt;ABC&lt;/P&gt;
&lt;P&gt;CDE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May i know how to read the customer name from the dataset? and work get the similar result as my original code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone can help? Please advise.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2015 20:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Query/m-p/232318#M42345</guid>
      <dc:creator>Toffeeman</dc:creator>
      <dc:date>2015-10-29T20:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Query/m-p/232329#M42349</link>
      <description>&lt;P&gt;Assuming you put your list of special customers in dataset &lt;STRONG&gt;specialCust&lt;/STRONG&gt;, you can adjust their discount in dataset &lt;STRONG&gt;CUST&lt;/STRONG&gt; with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
update cust
set discount = discount*0.1
where customer in (select customer from specialCust);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(untested)&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2015 20:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Query/m-p/232329#M42349</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-29T20:54:42Z</dc:date>
    </item>
  </channel>
</rss>

