<?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: Where statement for a specific values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191006#M36016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its indeed char, and I already put quotes around the value.&lt;/P&gt;&lt;P&gt;but the results are the same .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by the way when revewing the log, everything is O.K (there is no error messege in the log) I just keep getting an adentical file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Nov 2014 23:56:53 GMT</pubDate>
    <dc:creator>lior</dc:creator>
    <dc:date>2014-11-30T23:56:53Z</dc:date>
    <item>
      <title>Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191000#M36010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;what I'm, trying to do in this file is to&lt;STRONG style="text-decoration: underline;"&gt; eliminate&lt;/STRONG&gt; only the rows in which company_no= 11802 &lt;STRONG style="text-decoration: underline;"&gt;and&lt;/STRONG&gt; type=2 (colored in pink).&lt;/P&gt;&lt;P&gt;its look like a simple "where statement" should work but I havn't succeed&amp;nbsp; to formulate the right statement yet . Any idea?&lt;/P&gt;&lt;P&gt;Thanks, Lior&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 223px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="38" width="72"&gt;company_no.&lt;/TD&gt;&lt;TD class="xl67" width="72"&gt;type&lt;/TD&gt;&lt;TD class="xl67" width="79"&gt;quarter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11802&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;30/06/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="19"&gt;&lt;SPAN style="color: #ff00ff;"&gt;11802&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;&lt;SPAN style="color: #ff00ff;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69"&gt;&lt;SPAN style="color: #ff00ff;"&gt;30/06/2012&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11802&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;30/09/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="19"&gt;&lt;SPAN style="color: #ff00ff;"&gt;11802&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;&lt;SPAN style="color: #ff00ff;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69"&gt;&lt;SPAN style="color: #ff00ff;"&gt;30/09/2012&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11802&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;31/12/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="19"&gt;&lt;SPAN style="color: #ff00ff;"&gt;11802&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;&lt;SPAN style="color: #ff00ff;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69"&gt;&lt;SPAN style="color: #ff00ff;"&gt;31/12/2012&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11802&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;31/03/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="19"&gt;&lt;SPAN style="color: #ff00ff;"&gt;11802&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;&lt;SPAN style="color: #ff00ff;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69"&gt;&lt;SPAN style="color: #ff00ff;"&gt;31/03/2013&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;12137&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;30/06/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;12137&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;30/09/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;12137&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;31/12/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;12137&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;31/03/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11326&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;30/06/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11326&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;30/09/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11326&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;31/12/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;11326&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;31/03/2013&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 08:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191000#M36010</guid>
      <dc:creator>lior</dc:creator>
      <dc:date>2014-11-30T08:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191001#M36011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want(drop=flag) as &lt;/P&gt;&lt;P&gt;select *,case when company_no=11802 and type=2 then 1 else 0 end as flag from have&lt;/P&gt;&lt;P&gt;where calculated flag=0;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 13:17:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191001#M36011</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-11-30T13:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191002#M36012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc SQL is the way to go. Step by step, First, I would think how to extract these obs, then just do the opposite by using NOT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as&lt;/P&gt;&lt;P&gt;select * from have where NOT (&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;company_no=11802 and type=2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 16:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191002#M36012</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-11-30T16:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191003#M36013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for the answer. &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;the statement makes sense &lt;/SPAN&gt; but when I run this statement I'm getting file "want" which is identical to the file "have". meaning I havn't succeed to eliminate the rows where &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;company_no=11802 and type=2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I don't know what I'm doing wrong...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 23:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191003#M36013</guid>
      <dc:creator>lior</dc:creator>
      <dc:date>2014-11-30T23:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191004#M36014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Hi,&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;thanks for the answer. &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;the statement makes sense &lt;/SPAN&gt;but when I run this statement I'm getting file "want" which is identical to the file "have". meaning I havn't succeed to eliminate the rows where&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;company_no=11802 and type=2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;I don't know what I'm doing wrong...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="jive-thread-reply-btn" style="margin: 26px 0 -10px; font-size: 0.9em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;DIV class="jive-thread-reply-btn-correct" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/239967" style="margin: 0 20px 0 0; padding: 2px 14px 4px 28px; font-weight: bold; font-style: inherit; font-family: inherit; color: #0e66ba; background-color: #f3f3f3;"&gt;Re: Where statement for a specific values&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 23:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191004#M36014</guid>
      <dc:creator>lior</dc:creator>
      <dc:date>2014-11-30T23:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191005#M36015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One possibility is that the variable type. If your company_no AND/OR type is char, then you need to put quotes around the value:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;company_no='11802' and type='2'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 23:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191005#M36015</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-11-30T23:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191006#M36016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its indeed char, and I already put quotes around the value.&lt;/P&gt;&lt;P&gt;but the results are the same .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by the way when revewing the log, everything is O.K (there is no error messege in the log) I just keep getting an adentical file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 23:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191006#M36016</guid>
      <dc:creator>lior</dc:creator>
      <dc:date>2014-11-30T23:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191007#M36017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if both variables are chars, make sure there aren't invisible 'things' (such as blank, tab etc) in front of the visible content, try :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;left(company_no)='11802' and left(type)='2'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;or compress(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;company_no)='11802' and compress(type)='2'&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 00:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191007#M36017</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-12-01T00:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement for a specific values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191008#M36018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently I havn't wrote the values &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;'11802 and '2' in the right way (its should to be '0011802' and '02)'...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;after I correct it the statement work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks you very much,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Lior&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 09:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-statement-for-a-specific-values/m-p/191008#M36018</guid>
      <dc:creator>lior</dc:creator>
      <dc:date>2014-12-01T09:03:37Z</dc:date>
    </item>
  </channel>
</rss>

