<?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: Subset data based on Numeric &amp; Character Variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180313#M265066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use any condition, which is provided by tom, jegadish and karthik. and also you can use proc sql to print the same result. where if you use the proc sql, it should take less time to execute the code rather than using data step. Thanks, yaswanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: Consolas;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: Consolas;"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; sasuser.admit &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; actlevel &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: purple; background: white;"&gt;'HIGH'&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: purple; background: white;"&gt;'LOW'&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; fee gt &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: Consolas;"&gt;100&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;;&lt;/SPAN&gt;&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; &lt;STRONG style="color: navy; background: white; font-family: Consolas;"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16.0pt; font-family: Consolas; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; Thanks, yaswanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Dec 2013 08:54:08 GMT</pubDate>
    <dc:creator>yaswanthj</dc:creator>
    <dc:date>2013-12-23T08:54:08Z</dc:date>
    <item>
      <title>Subset data based on Numeric &amp; Character Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180309#M265062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X: Character Variable&lt;/P&gt;&lt;P&gt;Y: Numeric Variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to obtain the dataset with&lt;/P&gt;&lt;P&gt;X = a or b AND Y= 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do I write the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that if I use "where" both variables must be of the same type (both character or both numeric).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 00:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180309#M265062</guid>
      <dc:creator>apple</dc:creator>
      <dc:date>2013-12-23T00:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data based on Numeric &amp; Character Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180310#M265063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WHERE just want a valid boolean expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;(X = 'a' or X='b') AND (Y= 1) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 01:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180310#M265063</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-12-23T01:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data based on Numeric &amp; Character Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180311#M265064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternative code, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where X in ('a','b') and Y=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 01:36:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180311#M265064</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-12-23T01:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data based on Numeric &amp; Character Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180312#M265065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternately u can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if x in ("a","b") then output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where y=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 07:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180312#M265065</guid>
      <dc:creator>KarthikSrivasthav</dc:creator>
      <dc:date>2013-12-23T07:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data based on Numeric &amp; Character Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180313#M265066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use any condition, which is provided by tom, jegadish and karthik. and also you can use proc sql to print the same result. where if you use the proc sql, it should take less time to execute the code rather than using data step. Thanks, yaswanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: Consolas;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: Consolas;"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; sasuser.admit &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; actlevel &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: purple; background: white;"&gt;'HIGH'&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: purple; background: white;"&gt;'LOW'&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: blue; background: white;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt; fee gt &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: Consolas;"&gt;100&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;;&lt;/SPAN&gt;&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; &lt;STRONG style="color: navy; background: white; font-family: Consolas;"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16.0pt; font-family: Consolas; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; Thanks, yaswanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 08:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-based-on-Numeric-Character-Variables/m-p/180313#M265066</guid>
      <dc:creator>yaswanthj</dc:creator>
      <dc:date>2013-12-23T08:54:08Z</dc:date>
    </item>
  </channel>
</rss>

