<?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 wrong variable type: how to search in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/wrong-variable-type-how-to-search/m-p/404070#M98224</link>
    <description>&lt;P&gt;In my data, some character variables were defined as numeric by mistake.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, if I want to search "Yes" or "No", it does not work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data test;&lt;BR /&gt;27 set db.ct_reading;&lt;BR /&gt;28 where qc_accepted = 'Yes';&lt;BR /&gt;ERROR: WHERE clause operator requires compatible variables.&lt;BR /&gt;29 run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 469px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15879iDABCFC6EB652D564/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to work around this situation?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also see some cases where character variable missing is "." and numeric variable missing is " ".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to condition on these mis-typed missing values?&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 18:40:38 GMT</pubDate>
    <dc:creator>fengyuwuzu</dc:creator>
    <dc:date>2017-10-13T18:40:38Z</dc:date>
    <item>
      <title>wrong variable type: how to search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/wrong-variable-type-how-to-search/m-p/404070#M98224</link>
      <description>&lt;P&gt;In my data, some character variables were defined as numeric by mistake.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, if I want to search "Yes" or "No", it does not work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data test;&lt;BR /&gt;27 set db.ct_reading;&lt;BR /&gt;28 where qc_accepted = 'Yes';&lt;BR /&gt;ERROR: WHERE clause operator requires compatible variables.&lt;BR /&gt;29 run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 469px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15879iDABCFC6EB652D564/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to work around this situation?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also see some cases where character variable missing is "." and numeric variable missing is " ".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to condition on these mis-typed missing values?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 18:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/wrong-variable-type-how-to-search/m-p/404070#M98224</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2017-10-13T18:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: wrong variable type: how to search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/wrong-variable-type-how-to-search/m-p/404072#M98225</link>
      <description>&lt;P&gt;These numeric variables are formatted to show "yes" or "no"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to search for the numeric values, such as (this is often the case, but not always) 1 for yes and 0 for no.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you could remove the format, and then you can see in the view which values they have.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 18:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/wrong-variable-type-how-to-search/m-p/404072#M98225</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-10-13T18:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: wrong variable type: how to search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/wrong-variable-type-how-to-search/m-p/404077#M98227</link>
      <description>&lt;P&gt;yes, I used 1 for yes and it works.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will also try removing format.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 19:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/wrong-variable-type-how-to-search/m-p/404077#M98227</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2017-10-13T19:07:20Z</dc:date>
    </item>
  </channel>
</rss>

