<?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 Proc freq table error message? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-freq-table-error-message/m-p/870638#M343872</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to get the counts for any variables equal to 1; I use Proc Freq table below.&amp;nbsp; Why SAS showed an error message?&amp;nbsp; Thank you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=H4_SEC_UC;
	table sec_noumedcond sec_uasthma;
	 where (sec_noumedcond=1 or sec_uasthma=1);&lt;BR /&gt;run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;211  proc freq data=H4_SEC_UC;
212      table sec_noumedcond    sec_uasthma ;
219       where (sec_noumedcond=1 or sec_uasthma=1);
ERROR: WHERE clause operator requires compatible variables.
226  run;

NOTE: The SAS System stopped processing this step because of errors.&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 19 Apr 2023 20:36:34 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2023-04-19T20:36:34Z</dc:date>
    <item>
      <title>Proc freq table error message?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-freq-table-error-message/m-p/870638#M343872</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to get the counts for any variables equal to 1; I use Proc Freq table below.&amp;nbsp; Why SAS showed an error message?&amp;nbsp; Thank you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=H4_SEC_UC;
	table sec_noumedcond sec_uasthma;
	 where (sec_noumedcond=1 or sec_uasthma=1);&lt;BR /&gt;run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;211  proc freq data=H4_SEC_UC;
212      table sec_noumedcond    sec_uasthma ;
219       where (sec_noumedcond=1 or sec_uasthma=1);
ERROR: WHERE clause operator requires compatible variables.
226  run;

NOTE: The SAS System stopped processing this step because of errors.&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2023 20:36:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-freq-table-error-message/m-p/870638#M343872</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2023-04-19T20:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq table error message?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-freq-table-error-message/m-p/870641#M343873</link>
      <description>&lt;P&gt;The error message suggests that at least one of the variables on your WHERE statement are character rather than numeric.&amp;nbsp; So you would need to code perhaps:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where (sec_noumedcond='1' or sec_uasthma='1');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;'Compatible' in the error message means being the correct type.&amp;nbsp; The WHERE statement doesn't do automatic numeric to character conversions.&amp;nbsp; If you don't know which variable is character, you can run PROC CONTENTS on the dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 20:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-freq-table-error-message/m-p/870641#M343873</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-04-19T20:40:53Z</dc:date>
    </item>
  </channel>
</rss>

